You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by Markus Strauß <ma...@klt-ag.de> on 2003/01/23 14:42:08 UTC

Creating and Writing DOM

hi,

i want to create a DOM and write it to the cout with a DOMWriter. 

now funny is this:
when using the writeToString method, everything is okay, my DOMDocument
is written to the string.
when using the writeNode method, nothing appears. as a workaround i can
do the cout.write method, but.. well...

i use the DOMDocument with a NULL Document type. can that be the
problem? or is something with the XMLFormatTarget wrong?

<snip>
    XMLFormatTarget *myFormTarget = new StdOutFormatTarget();
    DOMWriter         *theSerializer =
((DOMImplementationLS*)impl)->createDOMWriter();
    String_cl teststring=toString(theSerializer->writeToString(*doc));
    std::cout.write((char *) teststring.c_str(), (int)
teststring.size()); // works
    theSerializer->writeNode(myFormTarget, *doc); //doesn't work 
</snip>


Mit freundlichen Grüßen / With best regards

Markus Strauß

Softwareentwickler
KRUSCHE LAGERTECHNIK AG
Am Kleinfeld 11
85456 Wartenberg
Tel.: 08762/7259 22
Fax.: 08762/7259 99
markus.strauss@klt-ag.de
www.klt-ag.de


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org