You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@xml.apache.org by aaz <aa...@webcapacity.com> on 2001/04/17 01:12:42 UTC

dumb question

Hello,
I just want to create a DOM XML document then get a String version of it to print the XML on the screen 
or write to a file. How do I do this? 

thanks!
-aaz

Re: dumb question

Posted by Edwin Goei <Ed...@eng.sun.com>.
"Joseph A. Rank" wrote:
> 
> Check out the DOMSerializer interface in org.apache.xml.serialize
> package, or, more generally, the BaseMarkupSerializer class.

Another way is to use the "transform" part of JAXP 1.1 by creating an
identiy transformer and transforming a DOMSource into a StreamResult
object.  See http://xml.apache.org/ xalan-j 2 docs for more info.  This
will make your app slightly more portable.

-Edwin

---------------------------------------------------------------------
In case of troubles, e-mail:     webmaster@xml.apache.org
To unsubscribe, e-mail:          general-unsubscribe@xml.apache.org
For additional commands, e-mail: general-help@xml.apache.org


Re: dumb question

Posted by "Joseph A. Rank" <jo...@trapdoor.net>.
Check out the DOMSerializer interface in org.apache.xml.serialize
package, or, more generally, the BaseMarkupSerializer class.

Cheers,

Joe

> aaz wrote:
> 
> Hello,
> I just want to create a DOM XML document then get a String version of
> it to print the XML on the screen
> or write to a file. How do I do this?
> 
> thanks!
> -aaz

-- 
Joe Rank
Internet Applications Developer
Trapdoor Net Systems
office: 512-328-0932
fax   : 512-328-2062

---------------------------------------------------------------------
In case of troubles, e-mail:     webmaster@xml.apache.org
To unsubscribe, e-mail:          general-unsubscribe@xml.apache.org
For additional commands, e-mail: general-help@xml.apache.org


Re: dumb question

Posted by Ankit <an...@ltp.soft.net>.
try "fp". its a part of apache jakarta project, used to read and write xml files.
regards,
ankit
  ----- Original Message ----- 
  From: aaz 
  To: general@xml.apache.org 
  Sent: Tuesday, April 17, 2001 4:42 AM
  Subject: dumb question


  Hello,
  I just want to create a DOM XML document then get a String version of it to print the XML on the screen 
  or write to a file. How do I do this? 

  thanks!
  -aaz