summaryrefslogtreecommitdiff
path: root/library/xmlreader.cpp
Unidiff
Diffstat (limited to 'library/xmlreader.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--library/xmlreader.cpp19
1 files changed, 17 insertions, 2 deletions
diff --git a/library/xmlreader.cpp b/library/xmlreader.cpp
index 1ae4485..1caab28 100644
--- a/library/xmlreader.cpp
+++ b/library/xmlreader.cpp
@@ -1,33 +1,39 @@
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#include "xmlreader.h" 20#include "xmlreader.h"
21 21
22/*! \class Node xmlreader.h
23 \brief A single element in an XML structure defined by XmlHandler
24
25 \ingroup qtopiaemb
26 */
27
22Node::Node() 28Node::Node()
23 : parent( 0 ), prev( 0 ), 29 : parent( 0 ), prev( 0 ),
24 next( 0 ), first( 0 ), last( 0 ) 30 next( 0 ), first( 0 ), last( 0 )
25{ 31{
26} 32}
27 33
28 34
29Node::~Node() 35Node::~Node()
30{ 36{
31 Node *n = first, *m; 37 Node *n = first, *m;
32 38
33 while ( n ) { 39 while ( n ) {
@@ -69,24 +75,33 @@ QMap<QString, QString> Node::attributeMap()
69 75
70QString Node::subData(const QString& tag) const 76QString Node::subData(const QString& tag) const
71{ 77{
72 Node* c = firstChild(); 78 Node* c = firstChild();
73 while ( c ) { 79 while ( c ) {
74 if ( c->tagName() == tag ) 80 if ( c->tagName() == tag )
75 return c->data(); 81 return c->data();
76 c = c->nextNode(); 82 c = c->nextNode();
77 } 83 }
78 return QString::null; 84 return QString::null;
79} 85}
80 86
87/*! \class XmlHandler xmlreader.h
88 \brief XML document structure holder
89
90 This class provides a Node structure that developers can read their
91 xml data into.
92
93 \ingroup qtopiaemb
94*/
95
81XmlHandler::XmlHandler() 96XmlHandler::XmlHandler()
82 : node( 0 ), tree( 0 ) 97 : node( 0 ), tree( 0 )
83{ 98{
84} 99}
85 100
86XmlHandler::~XmlHandler() 101XmlHandler::~XmlHandler()
87{ 102{
88} 103}
89 104
90 105
91bool XmlHandler::startDocument() 106bool XmlHandler::startDocument()
92{ 107{