You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xerces.apache.org by Kevin <ke...@yahoo.com> on 2002/08/15 00:41:03 UTC
Document Obj to a String/Stream?
Hi, anyone know how to take a Document object and
output a corresponding XML String/Stream.
In JDOM, they have a XMLOutputter can do that:
==========================================================
public void output(Document doc, java.io.OutputStream
out)
throws java.io.IOException
This will print the Document to the given output
stream. The
characters are printed using the encoding specified in
the
constructor, or a default of UTF-8.
==========================================================
Does anyone know how to do this using Xerces or Xalan
without using JDOM?
Thanks,
__________________________________________________
Do You Yahoo!?
HotJobs - Search Thousands of New Jobs
http://www.hotjobs.com
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org
RE: Document Obj to a String/Stream?
Posted by Tom Wang <to...@panscopic.com>.
Kevin,
You can try with:
org.apache.xml.serialize.OutputFormat
org.apache.xml.serialize.XMLSerializer
Tom Wang
Panscopic Corporation
Powering Innovative Web Reporting
http://www.panscopic.com/
> -----Original Message-----
> From: Kevin [mailto:kevinz00@yahoo.com]
> Sent: Wednesday, August 14, 2002 3:41 PM
> To: xerces-j-user@xml.apache.org
> Subject: Document Obj to a String/Stream?
>
>
> Hi, anyone know how to take a Document object and
> output a corresponding XML String/Stream.
> In JDOM, they have a XMLOutputter can do that:
> ==========================================================
> public void output(Document doc, java.io.OutputStream
> out)
> throws java.io.IOException
> This will print the Document to the given output
> stream. The
> characters are printed using the encoding specified in
> the
> constructor, or a default of UTF-8.
> ==========================================================
> Does anyone know how to do this using Xerces or Xalan
> without using JDOM?
>
> Thanks,
>
>
>
> __________________________________________________
> Do You Yahoo!?
> HotJobs - Search Thousands of New Jobs
> http://www.hotjobs.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-j-user-help@xml.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org