Women in Technology

Hear us Roar



Article:
  Processing XML with Xerces and the DOM
Subject:   Serializing Object to Xml Document
Date:   2007-12-19 23:46:41
From:   TataPowerSED
I have downloaded Xerces source code and using it since past few days. While trying to learn how to serialize object to Xml Document, i came across libxml folder. Understanding the code available in driver.cxx file, I tried to code the same way for my class. Following is the piece of code I have writen to serialize my object to Xml document.


// create a new XML document
XmlManager manager;
XmlDocument doc(manager.CreateDocument());
doc.setname("FilterObject.xml");


// Obtain DOM representation


xerces::DOMDocument &dom_doc (*doc.getContentsAsDOM());


filterscreenclass_(dom_doc,*c,map);


To my surprise, classes XmlManager, XmlDocument, DOMDocument are not being recognized by the compiler. I could find class definition for DOM document but not for other two classes in the entire xereces source code made available.


Does any one know where are these classes located?
Please help me out.


Regards,
Rajesh G Manwani