John:

Although I have not attempted this code myself, I think the code would look
something like this. The variable top would be the document node that would
be passed
in for printing the whole document. Hoping this is what you are looking
for, please
let me know if this worked:

void printTreeUnderNode(DOMNode *top)
{
  DOMImplementation *impl =
DOMImplementationRegistry::getDOMImplementation(0);
  DOMWriter *writer = ((DOMImplementationLS*)impl)->createDOMWriter();
  LocalFileFormatTarget myFormTarget("/tmp/output.xml");
  writer->writeNode(&myFormTarget, *top);
  myFormTarget.writeChars();
  writer->release();
}

regards,
raghu


John Meyer <[EMAIL PROTECTED]> on 03/03/2003 05:05:17 PM

Please respond to [EMAIL PROTECTED]

To:    [EMAIL PROTECTED]
cc:
Subject:    Writing out an XML file



Are there any good examples of how to use Xerces to
write out an XML File.  I'm trying to do this using
XMLDocument and XMLElement, but I don't know if I'm
doing it right.

__________________________________________________
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, more
http://taxes.yahoo.com/

---------------------------------------------------------------------
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]

Reply via email to