home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
qt3_emx.zip
/
examples
/
xml
/
tagreader
/
structureparser.cpp
< prev
next >
Wrap
C/C++ Source or Header
|
2001-10-11
|
1KB
|
36 lines
/****************************************************************************
** $Id: qt/structureparser.cpp 3.0.0 edited Jul 3 16:08 $
**
** Copyright (C) 1992-2000 Trolltech AS. All rights reserved.
**
** This file is part of an example program for Qt. This example
** program may be used, distributed and modified without limitation.
**
*****************************************************************************/
#include "structureparser.h"
#include <stdio.h>
#include <qstring.h>
bool StructureParser::startDocument()
{
indent = "";
return TRUE;
}
bool StructureParser::startElement( const QString&, const QString&,
const QString& qName,
const QXmlAttributes& )
{
printf( "%s%s\n", (const char*)indent, (const char*)qName );
indent += " ";
return TRUE;
}
bool StructureParser::endElement( const QString&, const QString&, const QString& )
{
indent.remove( 0, 4 );
return TRUE;
}