I am using the following code to output DOM tree into a file: int main(int argc, char* argv[]) { XMLPlatformUtils::Initialize();
DOMImplementation * impl = DOMImplementationRegistry::getDOMImplementation(0); DOMDocument * doc = impl->createDocument(0, X("test"), 0); DOMElement * root = doc->getDocumentElement(); DOMElement * item = doc->createElement(X("item")); root->appendChild(item); DOMWriter * writer = impl->createDOMWriter(); writer->setFeature(XMLUni::fgDOMWRTFormatPrettyPrint, true); XMLFormatTarget * writerTarget = new LocalFileFormatTarget("xerces_output.xml"); writer->writeNode(writerTarget, *root); XMLPlatformUtils::Terminate(); return 0; } What I get out is a pretty-printed XML but each new line character 0x0A is outputted twice (I verified this with a HEX editor). How do I prevent this from happening? Instead of getting: <test>0x0A<item/>0x0A<test> I get: 0x0A<test>0x0A0x0A<item/>0x0A0x0A<test>0x0A I am using Xerces 2.6.0 built using VC++ 6.0 SP3. Thanks, Petar --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]