![]() |
VR-Forces 4.8 Class Documentation
|
Represents a reader class that interacts with libXml to read the Di-Guy character digest file. More...
Public Member Functions | |
| DtBaseXmlReader () | |
| Default constructor. More... | |
| DtBaseXmlReader (xmlNodePtr root, xmlNodePtr node) | |
| virtual | ~DtBaseXmlReader () |
| Destructor. More... | |
| DtBaseXmlReader (const DtBaseXmlReader &node) | |
| Copy constructor. More... | |
| DtBaseXmlReader & | operator= (const DtBaseXmlReader &orig) |
| Assignment operator. More... | |
| virtual xmlNodePtr | findNode (xmlNodePtr node, const char *nodeName) |
Finds the first node whose tag matches the one given by nodeName. More... | |
| virtual xmlNodePtr | findNode (xmlNodePtr node, const char *nodeName, const char *attrName, const char *attrValue) |
| Finds the node named as nodeName and that also has an attribute named attrName with a value of attrValue. More... | |
| virtual DtString | getAttrValue (xmlNodePtr node, const char *attrname) const |
| Returns the value of the attribute attrname inside the node. More... | |
| virtual DtString | getAtomicNodeValue (xmlNodePtr node, const char *nodeName) |
| Returns the value of an "atomic" node. More... | |
| virtual void | nextNode (xmlNodePtr &node) |
| virtual xmlNodePtr | getRootNode () |
Protected Member Functions | |
| virtual DtString | getAtomicNodeValue (xmlNodePtr node) const |
| Returns the value of an "atomic" node. More... | |
| virtual xmlNodePtr | getChildren (xmlNodePtr node) const |
| Returns a pointer to the first child of the node or NULL if not defined The reason for this method is because libXml also includes blank text nodes sometimes, so they need to be filtered out. More... | |
Protected Attributes | |
| xmlNodePtr | myRootNode |
| xmlNodePtr | myCurNode |
Represents a reader class that interacts with libXml to read the Di-Guy character digest file.
Represents a reader class that interacts with libXml to read an xml file that is represented as a n-ary tree document in which the tags contained inside other tags are represented as parent-child relationships. For example,
is represented as a tree with the Ellipsoid node as the father and SemiMajorRadius and SemiMinorRadius as children. Both SemiMajorRadius and SemiMinorRadius are considered atomic nodes since they have no child tags.
| DtBaseXmlReader::DtBaseXmlReader | ( | ) |
Default constructor.
| DtBaseXmlReader::DtBaseXmlReader | ( | xmlNodePtr | root, |
| xmlNodePtr | node | ||
| ) |
|
virtual |
Destructor.
| DtBaseXmlReader::DtBaseXmlReader | ( | const DtBaseXmlReader & | node | ) |
Copy constructor.
| DtBaseXmlReader& DtBaseXmlReader::operator= | ( | const DtBaseXmlReader & | orig | ) |
Assignment operator.
|
virtual |
Finds the first node whose tag matches the one given by nodeName.
| node | Starting node for the search inside the xml document |
| nodeName | Name of the node to be searched (e.g. "GridStructure") |
|
virtual |
Finds the node named as nodeName and that also has an attribute named attrName with a value of attrValue.
For example, findNode(nodeptr, "GridStructure", "name", "abc") searches for a node that looks like
<GridStructure name="abc">
...
</GridStructure>
|
virtual |
Returns the value of the attribute attrname inside the node.
Attributes are specified inside the node like this
<node attrname=value ...>
...
</node>
| node | Node to access |
| attrname | Name of the attribute to be searched (e.g. "name") |
|
virtual |
Returns the value of an "atomic" node.
Atomic nodes are the ones that have the following structure <tag>value</tag>.
| node | Node to start the search of the atomic node |
| nodeName | Name of the atomic node to be searched |
|
virtual |
|
inlinevirtual |
|
protectedvirtual |
Returns the value of an "atomic" node.
Atomic nodes are the ones that have the following structure <tag>value</tag>. It returns the empty string if the node has the form or <tag></tag>
|
protectedvirtual |
Returns a pointer to the first child of the node or NULL if not defined The reason for this method is because libXml also includes blank text nodes sometimes, so they need to be filtered out.
This function guarantees you get an actual child node as the first node
|
protected |
|
protected |