Yes, my initial question about this (going from DOM doc to String) was
coming from the JDOM point-of-view.  It is extremely easy to convert from a
DOM document to a String:

1. Instantiate an XMLOutputter
2. call output, passing the Document and an outputstream (say, a byte
array).
3. New string, passing the byte array

And you're done.  Literally 3-4 lines of code.  As I've learned, it's not so
easy with xerces-c.  JDOM has certainly spoiled me w.r.t how easy it is to
do practical things that need to be done with XML.  Thanks for all the tips.

-----Original Message-----
From: Gavin Stokes [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 30, 2001 2:27 PM
To: [EMAIL PROTECTED]
Subject: Xerces C question: Let the magic work.


At 03:59 PM 7/28/01 -0700, you wrote:
>But how would you do it, man ?
>just sit back and let the magic work ?

How is it that the Java version makes it so easy?  This lack of 
DOM-to-string functionality, combined with lack of any means to transmit 
the XML to a server, led me to abandon Xerces C altogether and rewrite 
everything in Java.  What a great decision: Three weeks after knowing not a 
scrap of Java, I have a functioning architecture that builds a DOM, gets it 
as XML, sends it to a server, and receives replies.

With all respect to the DOM folks, the failure to provide any means of 
actually getting XML out of the DOM is a major one.  XML is all about text, 
so where's the text handling?  I certainly hope that finally, in version 3 
of the DOM, we get something useful.

I just wonder why, after all the questions about this, no one has written a 
lean and clean DOM-to-string function.  I wish I had time to do it.  But 
someone took the time to write DOMPrint and all those other examples; I 
would have thought that DOM-to-string would have been example 1 on 
everyone's list.

Regards,
Gavin


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