Heres the way I've done it:
boolean pretty = true;
StringWriter result = new StringWriter();
PrintWriter pw = new PrintWriter(result);
XMLSerializer text = new XMLSerializer(pw,new
OutputFormat(doc,"UTF-8",pretty));
try {
text.serialize(doc);
} catch(IOException ioe) {
ioe.printStackTrace();
}
return result.toString();
Good luck.
Dane Summers
Synergy Solutions.
--- "Rodriguez, Victor" <[EMAIL PROTECTED]> wrote:
> Greetings,
>
> I have an org.w3c.dom.Document in memory and I need
> to put it into a String
> object.
>
> How can I do this? Your prompt reply is
> appreciated!
>
> Regards,
>
> --
> Victor Rodriguez
> Software Engineer - Avolent, Inc. (formerly Solant,
> Inc.)
> Tel: 303-583-3733 Fax: 303-652-6072
>
> Come visit us at http://www.avolent.com
> <http://www..com> .
>
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
>
>
>
__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - Buy the things you want at great prices.
http://auctions.yahoo.com/