Example to create a new xml file with the TXMLEngine class
void xmlnewfile(const char* filename = "example.xml")
{
xml.
NewChild(mainnode, 0,
"child1",
"Content of child1 node");
xml.
NewAttr(child2, 0,
"attr1",
"value1");
xml.
NewAttr(child2, 0,
"attr2",
"value2");
xml.
NewChild(child3, 0,
"subchild1",
"subchild1 content");
xml.
NewChild(child3, 0,
"subchild2",
"subchild2 content");
xml.
NewChild(child3, 0,
"subchild3",
"subchild3 content");
xml.
NewChild(child4, ns4,
"subchild1",
"subchild1 content");
xml.
NewChild(child4, ns4,
"subchild2",
"subchild2 content");
xml.
NewChild(child4, ns4,
"subchild3",
"subchild3 content");
}
- Author
- Sergey Linev
Definition in file xmlnewfile.C.