Example to read and parse any xml file, supported by TXMLEngine class The input file, produced by xmlnewfile.C macro is used If you need full xml syntax support, use TXMLParser instead
0.0174610614777
3.87482094765
Processing /mnt/build/workspace/root-makedoc-v614/rootspi/rdoc/src/v6-14-00-patches/tutorials/xml/xmlreadfile.C...
#include <stdio.h>
{
printf(
"%*c node: %s\n", level,
' ', xml.
GetNodeName(node));
if (ns != 0)
while (attr != 0) {
}
if (content != 0)
printf("%*c cont: %s\n", level + 2, ' ', content);
while (child != 0) {
DisplayNode(xml, child, level + 2);
}
}
void xmlreadfile(const char* filename = "example.xml")
{
if (!xmldoc) return;
DisplayNode(xml, mainnode, 1);
}
- Author
- Sergey Linev
Definition in file xmlreadfile.C.