|
#include "xmlwriter.h"
int main(int argc, char* argv[])
{
xmlwriter MyXml("boby.xml");
MyXml.AddAtributes("age","25");
MyXml.AddAtributes("Profession","Software");
MyXml.Createtag("Boby");
MyXml.AddComment("Personal information");
MyXml.Createtag("Home"); // create node boby
MyXml.CreateChild("Address","Pazheparampil"); // add element
MyXml.CreateChild("Mobile","09844400873");
MyXml.CloseLasttag(); // close boby
MyXml.AddComment("Office information");
MyXml.Createtag("Office"); // create node boby
MyXml.CreateChild("Address","Bangalore"); // add element
MyXml.CreateChild("Ph","0091234567");
MyXml.CloseLasttag(); // close Office
MyXml.CloseAlltags();
cout<<"See boby.xml for output";
return 0;
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.