summaryrefslogtreecommitdiff
path: root/library/xmlreader.h
Unidiff
Diffstat (limited to 'library/xmlreader.h') (more/less context) (ignore whitespace changes)
-rw-r--r--library/xmlreader.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/library/xmlreader.h b/library/xmlreader.h
index 2a51176..a4a6697 100644
--- a/library/xmlreader.h
+++ b/library/xmlreader.h
@@ -1,68 +1,68 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved. 2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qtopia Environment. 4** This file is part of the Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13** 13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information. 14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15** 15**
16** Contact info@trolltech.com if any conditions of this licensing are 16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you. 17** not clear to you.
18** 18**
19**********************************************************************/ 19**********************************************************************/
20#ifndef XMLREADER_H 20#ifndef XMLREADER_H
21#define XMLREADER_H 21#define XMLREADER_H
22 22
23#include <qstring.h> 23#include <qstring.h>
24#include <qxml.h> 24#include <qxml.h>
25#include <qmap.h> 25#include <qmap.h>
26 26
27class Node 27class Node
28{ 28{
29public: 29public:
30 Node(); 30 Node();
31 ~Node(); 31 ~Node();
32 32
33 void addChild( Node *child ); 33 void addChild( Node *child );
34 34
35 void setAttributes( const QXmlAttributes &a ); 35 void setAttributes( const QXmlAttributes &a );
36 QMap<QString, QString> attributeMap(); 36 QMap<QString, QString> attributeMap();
37 QString attribute( const QString& name ); 37 QString attribute( const QString& name );
38 38
39 Node *nextNode() const { return next; } 39 Node *nextNode() const { return next; }
40 Node *prevNode() const { return prev; } 40 Node *prevNode() const { return prev; }
41 Node *parentNode() const { return parent; } 41 Node *parentNode() const { return parent; }
42 Node *lastChild() const { return last; } 42 Node *lastChild() const { return last; }
43 Node *firstChild() const { return first; } 43 Node *firstChild() const { return first; }
44 44
45 void setTagName( const QString &s ) { tagN = s; } 45 void setTagName( const QString &s ) { tagN = s; }
46 QString tagName() const { return tagN; } 46 QString tagName() const { return tagN; }
47 void setData( const QString &s ) { dt = s; } 47 void setData( const QString &s ) { dt = s; }
48 QString data() const { return dt; } 48 QString data() const { return dt; }
49 QString subData(const QString& tag) const; 49 QString subData(const QString& tag) const;
50 void appendData( const QString s ) { dt += s; } 50 void appendData( const QString s ) { dt += s; }
51 51
52 52
53private: 53private:
54 QMap<QString, QString> attributes; 54 QMap<QString, QString> attributes;
55 QString dt, tagN; 55 QString dt, tagN;
56 56
57 Node *parent, *prev, *next, *first, *last; 57 Node *parent, *prev, *next, *first, *last;
58}; 58};
59 59
60class XmlHandlerPrivate; 60class XmlHandlerPrivate;
61class XmlHandler : public QXmlDefaultHandler 61class XmlHandler : public QXmlDefaultHandler
62{ 62{
63public: 63public:
64 XmlHandler(); 64 XmlHandler();
65 ~XmlHandler(); 65 ~XmlHandler();
66 66
67 bool startDocument(); 67 bool startDocument();
68 bool endDocument(); 68 bool endDocument();