Main Page   Class Hierarchy   Compound List   File List   Compound Members  

XMLChild Class Reference

A child node of an XML element. More...

#include <XMLChild.h>

Inheritance diagram for XMLChild:

Inheritance graph
[legend]
Collaboration diagram for XMLChild:

Collaboration graph
[legend]
List of all members.

Public Types

enum  ChildType { ELEMENT, TAG, CDATA }
 XML Child Types.


Public Methods

 XMLChild (const ChildType &type=CDATA)
 Constructor.

virtual ChildType GetType () const
 get the type of child.

virtual void SetType (const ChildType &newType)
 set the type of child.

virtual string ToString () const
 convert to a string. More...


Public Attributes

typedef  XMLChildType

Protected Methods

XMLChild& Copy (const XMLChild &rhs)
 copy constructor.

void Init (const ChildType &newType)
 initializer.

bool Equals (const XMLChild &rhs) const
 operator==.


Detailed Description

A child node of an XML element.

An XMLChild can be either an Element, Tag, or character data according to the W3C


Member Function Documentation

string XMLChild::ToString ( ) const [inline, virtual]
 

convert to a string.

this is useful for polymorphism. without knowing the type of child, you do know that each can be converted to a string

Reimplemented in CDataChild, ElementChild, and TagChild.


The documentation for this class was generated from the following file:
Generated at Wed May 2 00:21:08 2001 for libXMLement by doxygen1.2.6 written by Dimitri van Heesch, © 1997-2001