ROOT implementation of a XML DOM Parser.
This is an example of how Dom Parser walks the DOM tree recursively. This example will parse any xml file.
To run this program
Requires: person.xml
{
cout <<
attr->GetName() <<
":" <<
attr->GetValue();
}
}
}
}
}
}
}
{
domParser->ParseFile(dir+
"/io/xml/person.xml");
ParseContext(node);
}
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t attr
TXMLAttribute is the attribute of an Element.
TXMLNode contains a pointer to xmlNode, which is a node under the DOM tree.
TList * GetAttributes()
Returns a list of node's attribute if any, returns 0 if no attribute.
const char * GetContent() const
Returns the content if any, or 0.
TXMLNode * GetNextNode()
Returns the next sibling XMLNode in the DOM tree, if any return 0 if no next node.
TXMLNode * GetChildren()
Returns the node's child if any, returns 0 if no child.
const char * GetNodeName() const
Returns the node's name.
Bool_t HasAttributes() const
Returns true if Element node has attribute.
EXMLElementType GetNodeType() const
Returns the node's type.
- Author
- Sergey Linev
Definition in file DOMRecursive.C.