![]() |
VR-Forces 5.0.1 Developer's Guide
|
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.
Public Member Functions | |
| DtBaseXmlReader () | |
| DtBaseXmlReader (xmlNodePtr root, xmlNodePtr node) | |
| virtual | ~DtBaseXmlReader () |
| DtBaseXmlReader (const DtBaseXmlReader &node) | |
| DtBaseXmlReader & | operator= (const DtBaseXmlReader &orig) |
| virtual xmlNodePtr | findNode (xmlNodePtr node, const char *nodeName) |
| virtual xmlNodePtr | findNode (xmlNodePtr node, const char *nodeName, const char *attrName, const char *attrValue) |
| virtual DtString | getAttrValue (xmlNodePtr node, const char *attrname) const |
| virtual DtString | getAtomicNodeValue (xmlNodePtr node, const char *nodeName) |
| virtual void | nextNode (xmlNodePtr &node) |
| virtual xmlNodePtr | getRootNode () |
Protected Member Functions | |
| virtual DtString | getAtomicNodeValue (xmlNodePtr node) const |
| virtual xmlNodePtr | getChildren (xmlNodePtr node) const |
Protected Attributes | |
| xmlNodePtr | myRootNode |
| xmlNodePtr | myCurNode |
| 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 |