I have an xml document,using JAXP.....how do i convert this document back into an XML string,.....i know i can do this with using TXDocument(IBM PARSER),but that is not what my company is using....SO I NEED TO DO THIS USING JAXP........ please help!!!
Ajith Kallambella
Sheriff
Joined: Mar 17, 2000
Posts: 5782
posted
0
How are you parsing the document? If you're using an InputSource( ie., org.xml.sax.InputSource), you could use InputSource.getByteStream() to get an instance of java.io.InputStream. You can also use InputSource.getCharacterStream() to get an instance of java.io.Reader corresponding to the XML source(file). Once you have a handle to a i/o stream you can simply read the characters in the XML document into a string.
Hope that helps, ------------------ Ajith Kallambella M. Sun Certified Programmer for the Java�2 Platform. IBM Certified Developer - XML and Related Technologies, V1.
Open Group Certified Distinguished IT Architect. Open Group Certified Master IT Architect. Sun Certified Architect (SCEA).
Carl Trusiak
Sheriff
Joined: Jun 13, 2000
Posts: 3340
posted
0
In Oreilly's Book Java Examples in a Nutshell which is listed in our Bunkhouse They have a example called XMLDocumentWriter.java it's in chapter 19 which is on-line It strictly used the org.w3c.dom package so it will work with any parser derived from it. Licensing information for commercial use is Here ------------------ Hope This Helps Carl Trusiak