Igor, Your code seems to be ok. But Xerces-C++ 2.1.0 didn't implement the formatPrettyPrint feature with indentation.
Such implementation has been changed in the current development code. Now the formatPrettyPrint feature prints indentation and newline. Please try again with the latest nightly build (http://xml.apache.org/dist/xerces-c/nightly/) see if it got printed "prettier". Tinny ----- Original Message ----- From: "Shtilkind, Igor" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, January 06, 2003 3:28 PM Subject: What is the best way to write a XML DOM tree to a file with all indentation? > Hi all, > What is the best way to write a XML DOM tree to a file with all indentation? > I use > bool formatPrettyPrint = true; > if (theSerializer->canSetFeature(XMLUni::fgDOMWRTFormatPrettyPrint, > formatPrettyPrint)) > theSerializer->setFeature(XMLUni::fgDOMWRTFormatPrettyPrint, > formatPrettyPrint); > XMLFormatTarget *myFormTarget = new StdOutFormatTarget(); > theSerializer->writeNode(myFormTarget, *doc); > XMLCh* source = theSerializer->writeToString(*doc); > > I tried to search the e-mail archives but <http://archive.covalent.net> is > not available. Are there other Xerces-C references available besides > downloaded samples? > Thanks, > > Savely > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
