lib

KoXmlNode Class Reference

#include <KoXmlReader.h>

Inheritance diagram for KoXmlNode:

KoXmlDocument KoXmlElement KoXmlText KoXmlCDATASection List of all members.

Detailed Description

KoXmlNode represents a node in a DOM tree.

KoXmlNode is a base class for KoXmlElement, KoXmlText. Often, these subclasses are used for getting the data instead of KoXmlNode. However, as base class, KoXmlNode is very helpful when for example iterating all child nodes within one parent node.

KoXmlNode implements an explicit sharing, a node shares its data with other copies (if exist).

Author:
Ariya Hidayat <ariya@kde.org>

Definition at line 64 of file KoXmlReader.h.


Public Types

enum  NodeType {
  NullNode = 0, ElementNode, TextNode, CDATASectionNode,
  ProcessingInstructionNode, DocumentNode
}

Public Member Functions

 KoXmlNode ()
 KoXmlNode (const KoXmlNode &node)
KoXmlNodeoperator= (const KoXmlNode &node)
bool operator== (const KoXmlNode &) const
bool operator!= (const KoXmlNode &) const
virtual ~KoXmlNode ()
virtual KoXmlNode::NodeType nodeType () const
virtual bool isNull () const
virtual bool isElement () const
virtual bool isText () const
virtual bool isCDATASection () const
virtual bool isDocument () const
void clear ()
KoXmlElement toElement ()
KoXmlText toText ()
KoXmlCDATASection toCDATASection ()
KoXmlDocument toDocument ()
virtual QString nodeName () const
virtual QString namespaceURI () const
virtual QString prefix () const
virtual QString localName () const
KoXmlDocument ownerDocument () const
KoXmlNode parentNode () const
bool hasChildNodes () const
KoXmlNode firstChild () const
KoXmlNode lastChild () const
KoXmlNode nextSibling () const
KoXmlNode previousSibling () const
KoXmlNode namedItem (const QString &name) const
KoXmlNode namedItemNS (const QString &nsURI, const QString &name) const
void load (int depth=1)
void unload ()

Protected Member Functions

 KoXmlNode (KoXmlNodeData *)

Protected Attributes

KoXmlNodeData * d

Member Function Documentation

void KoXmlNode::load ( int  depth = 1  ) 

Loads all child nodes (if any) of this node.

Normally you do not need to call this function as the child nodes will be automatically loaded when necessary.

Definition at line 1202 of file KoXmlReader.cpp.

void KoXmlNode::unload (  ) 

Releases all child nodes of this node.

Definition at line 1207 of file KoXmlReader.cpp.


The documentation for this class was generated from the following files:
KDE Home | KDE Accessibility Home | Description of Access Keys