Qt API | Qtopia API | Qtopia Documentation |

# Node Class Reference

The Node class is a single element in an XML structure defined by XmlHandler. More...

`#include <qtopia/xmlreader.h>`

List of all member functions.

## Public Members

- Node ()
- ~Node ()
- void addChild ( Node * child )
- void setAttributes ( const QXmlAttributes & a )
- QMap<QString, QString> attributeMap ()
- QString attribute ( const QString & name )
- Node * nextNode () const
- Node * prevNode () const
- Node * parentNode () const
- Node * lastChild () const
- Node * firstChild () const
- void setTagName ( const QString & s )
- QString tagName () const
- void setData ( const QString & s )
- QString data () const
- QString subData ( const QString & tag ) const
- void appendData ( const QString s )

## Detailed Description

The Node class is a single element in an XML structure defined by XmlHandler.

See also XmlHandler and Qtopia Classes.

## Member Function Documentation

### Node::Node ()

Creates an invalid Node

### Node::~Node ()

Destructs a Node, and deletes its children.

### void Node::addChild ( Node * child )

Safely sets Node child to be a child of this Node.

### void Node::appendData ( const QString s )

Appends s to the current tag's data.

### QString Node::attribute ( const QString & name )

Returns the value of the attribute tagged as name.

### QMap<QString, QString> Node::attributeMap ()

Returns all of the Node's attributes.

### QString Node::data () const

Returns the current tag's data.

### Node * Node::firstChild () const

Returns the Node's first child.

### Node * Node::lastChild () const

Returns the Node's last child.

### Node * Node::nextNode () const

Returns the Node's next sibling.

### Node * Node::parentNode () const

Returns the Node's parent.

### Node * Node::prevNode () const

Returns the Node's previous sibling.

### void Node::setAttributes ( const QXmlAttributes & a )

Adds the attributes in a to the Node's current attributes, overwriting any conflicts with existing attributes.

### void Node::setData ( const QString & s )

Sets the current tag's data to s.

### void Node::setTagName ( const QString & s )

Sets the current tag's name to s.

### QString Node::subData ( const QString & tag ) const

Returns the value of the first attribute named tag from any of the Node's children.

### QString Node::tagName () const

Returns the current tag's name.

This file is part of the Qtopia , copyright © 1995-2002 Trolltech, all rights reserved.