Forwarded for Srikanth.

Once I used the 1.0 in the setversion() function it is
working fine. But I am interested in displaying the
XML declaration node in the file along with the XML
tree builded in my application. I am using the
following piece of code to write the xml content into
the file. But this is not printing the XML declaration
even after setting SetVersion ,SetEncodingName,SetStandAlone
after creation of the XML document. 

       DOMImplementation *impl          =
DOMImplementationRegistry::getDOMImplementation(tempStr);
                DOMWriter         *theSerializer =
((DOMImplementationLS*)impl)->createDOMWriter();
                       // plug in user's own error
handler
                DOMErrorHandler *myErrorHandler = new
DOMPrintErrorHandler();

theSerializer->setErrorHandler(myErrorHandler);

theSerializer->setEncoding(X("UTF-8"));

                XMLFormatTarget *myFormTarget = new
LocalFileFormatTarget(fileName.Data());
                theSerializer->writeNode(myFormTarget,
*doc);


Can any body tell me how to get this XML declaration node
to be printed into the file.

Thanks & Regards,
Srikanth



-- 
Gareth Reakes, Head of Product Development  +44-1865-203192
DecisionSoft Limited                        http://www.decisionsoft.com
XML Development and Services




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to