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!!!
Joined: Mar 17, 2000
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).
Joined: Jun 13, 2000
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