xml-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kyzivat, Keith" <kkyzi...@iconverse.com>
Subject RE: XML to String?
Date Mon, 14 May 2001 14:24:50 GMT
This seems to be a frequently asked question...
Thus, this sounds like a good candidate to add to the 
"Writing Applications FAQ" (seems the most appropriate given the topic)

This would cut down on the noise on this mailing list a bit..

~Keith

-----Original Message-----
From: Tim McCune [mailto:timm@channelpoint.com]
Sent: Sunday, May 13, 2001 1:26 PM
To: general@xml.apache.org
Subject: RE: XML to String?


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

import java.io.*;
import javax.xml.transform.*;
import javax.xml.transform.dom.*;
import javax.xml.transform.stream.*;

StringWriter sw = new StringWriter();
TransformerFactory.newInstance().newTransformer().transform(new
DOMSource(myDOMNode), new StreamResult(sw));
String myXMLString = sw.toString();

> -----Original Message-----
> From: Rasmus Munk Jensen [mailto:munk@writeme.com]
> Sent: Sunday, May 13, 2001 2:42 AM
> To: general@xml.apache.org
> Subject: XML to String?
> 
> 
> Hi
> 
> I am very new to XML / XSLT, and do not yet fully understand 
> the Xalan /
> Xerces APIs. So maybe this question seems a little stupid, 
> but anyway, here
> it goes: How do I transform/convert a DOM to an XML-string? A
> working example, or just a hint of where to look, would be highly
> appreciated.  
> 
> Thanks,
> 
> Rasmus
> 
> 
> --------------------------------------------------------------------
> - 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
> 

-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 6.5.3 for non-commercial use <http://www.pgp.com>

iQA/AwUBOv7DZNUPOr8a7vy5EQKuYQCeIfdh635O4QRme+C2yc/gsuLB6swAn00m
ibizqqieOsyt8AGNKUvcYh+0
=66Yl
-----END PGP SIGNATURE-----

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


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


Mime
View raw message