Main Page   Namespace List   File List   Namespace Members  

libXMLTree Namespace Reference

XML Element Tree Operations. More...


Functions

string GetText (const Element *element)
 returns the first text child from an element. More...

string GetElementText (const Element *element, const string &elementName)
 get the text child an element within a tree. More...

list<string> GetTextChildren (const Element *element)
 get all text children from element. More...

ElementList GetElementChildren (const Element *element)
 get all element children from element. More...

list<Tag*> GetTagChildren (const Element *element)
 get all tag children from element. More...

Element* GetElementByAttribute (const Element *element, const string &att, const string &val)
 Get an element that has a specified attribute. More...

Element* GetElementByName (const Element *element, const string &named)
 Get the first Element* whose name matches the one given.

ElementList GetChildrenByName (const Element *element, const string &named)
 Get a list<Element*> of children whose name matches the name given.

void Add (Element *element, const string &cdata)
 Add a text node.

void Add (Element *element, Element *newChild)
 Add an Element* node.

void Add (Element *element, Tag *tag)
 Add a Tag* node.

void Delete (Element *element, const string &cdata)
 Delete a text node.

void Delete (Element *element, Element *oldChild)
 Delete an Element* node.

void Delete (Element *element, Tag *tag)
 Delete a Tag* node.


Detailed Description

XML Element Tree Operations.

Operations to Add && Delete nodes, and easily select nodes from a tree


Function Documentation

Element * libXMLTree::GetElementByAttribute ( const Element * element,
const string & att,
const string & val )
 

Get an element that has a specified attribute.

Parameters:
element:   the tree root
att:   the attribute to look for
val:   the value to compare
Returns:
the first Element* whose value is the same as given

ElementList libXMLTree::GetElementChildren ( const Element * element )
 

get all element children from element.

Returns:
a list<Element*> of element's children

string libXMLTree::GetElementText ( const Element * element,
const string & elementName )
 

get the text child an element within a tree.

given the tree root, element, return the first text child from the element with the name, elementName

list< Tag *> libXMLTree::GetTagChildren ( const Element * element )
 

get all tag children from element.

Returns:
a list<Tag*> of element's children

string libXMLTree::GetText ( const Element * element )
 

returns the first text child from an element.

finds the first and hopefully only text node from the element and returns it

list< string > libXMLTree::GetTextChildren ( const Element * element )
 

get all text children from element.

Returns:
a list<string> of cdata


Generated at Wed Apr 4 21:33:51 2001 for libXMLTree by doxygen1.2.6 written by Dimitri van Heesch, © 1997-2001