27#include <libxml/tree.h>
36 fXMLNode(node), fParent(parent), fChildren(0), fNextNode(0),
37 fPreviousNode(previous), fAttrList(0)
68 return (
const char *)
fXMLNode->name;
100 return (
const char *)
fXMLNode->content;
117 xmlAttr *attr_node =
fXMLNode->properties;
118 for (; attr_node; attr_node = attr_node->next) {
120 (
const char *) attr_node->children->content));
157 if (
fXMLNode->children->type == XML_TEXT_NODE)
158 return (
const char *)
fXMLNode->children->content;
209 return (
const char *)
fXMLNode->ns->href;
220 return (
const char *)
fXMLNode->ns->prefix;
virtual void Add(TObject *obj)
virtual void Delete(Option_t *option="")
Remove all objects from the list AND delete all heap based objects.
TXMLAttribute is the attribute of an Element.
TXMLNode contains a pointer to xmlNode, which is a node under the DOM tree.
TList * fAttrList
List of Attributes.
TList * GetAttributes()
Returns a list of node's attribute if any, returns 0 if no attribute.
TXMLNode * fPreviousNode
Previous sibling node.
_xmlNode * fXMLNode
libxml node
Bool_t HasChildren() const
Returns true if node has children.
virtual ~TXMLNode()
Destructor.
Bool_t HasParent() const
Returns true if node has parent.
const char * GetText() const
Returns the content of a Text node if node is a TextNode, 0 otherwise.
const char * GetContent() const
Returns the content if any, or 0.
EXMLElementType
This enum is based on libxml tree Enum xmlElementType.
TXMLNode * fNextNode
Next sibling node.
const char * GetNamespaceHref() const
Returns the URL for the namespace, or 0 if no namespace.
const char * GetNamespacePrefix() const
Returns prefix for the namespace, or 0 if no namespace.
TXMLNode * fParent
Parent node.
TXMLNode * GetNextNode()
Returns the next sibling XMLNode in the DOM tree, if any return 0 if no next node.
Bool_t HasPreviousNode() const
Returns true if has previous node.
TXMLNode * GetParent() const
Returns the node's parent if any, returns 0 if no parent.
TXMLNode(const TXMLNode &)=delete
TXMLNode * GetPreviousNode() const
Returns the previous sibling XMLNode in the DOM tree, if any return 0 if no previous node.
TXMLNode * GetChildren()
Returns the node's child if any, returns 0 if no child.
TXMLNode * fChildren
Children node.
const char * GetNodeName() const
Returns the node's name.
Bool_t HasNextNode() const
Returns true if has next node.
Bool_t HasAttributes() const
Returns true if Element node has attribute.
EXMLElementType GetNodeType() const
Returns the node's type.