xml-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Edwin Goei <Edwin.G...@sun.com>
Subject Re: writing the dom into the file
Date Thu, 19 Apr 2001 19:56:49 GMT
Kate Lapan wrote:
> 
> I'm converting my code from jaxp and crimson to xerces.
> 
> How do I write the document into a file?
> 
> Before it was done:
> 
> doc.write(outWriter);
> 
> where doc is org.apache.crimson.tree.XmlDocument

The XmlDocument#write method is an internal crimson method that is not
part of the JAXP API.  Until DOM Level 3 comes out, the most portable
way to do this is to use the javax.xml.transform package.  You create an
identity transformer and then transform a DOMSource into a StreamResult
object.  This should probably be added to a FAQ, probably at least the
Xalan FAQ.  The best pointer I could find was
http://xml.apache.org/xalan-j/usagepatterns.html#dom.  It needs to be
modified to use a StreamResult object.

-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


Mime
View raw message