This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Web Services and the fly likes Turn a string (which is essentially a Document.toString()) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Turn a string (which is essentially a Document.toString())" back into a Document?" Watch "Turn a string (which is essentially a Document.toString())" back into a Document?" New topic
Author

Turn a string (which is essentially a Document.toString())" back into a Document?

Goofus McDoofus
Greenhorn

Joined: Oct 05, 2002
Posts: 2
In order to return a Document from an RPC (SOAP), I am turning it into a string (for serialization).
I want to use stylesheets to display the results on the client. Is there a utility which will turn this String back into a Document (or am I barking up the wrong tree)?
Rangarajan Suresh
Ranch Hand

Joined: Jan 08, 2002
Posts: 50
Originally posted by Goofus McDoofus:
In order to return a Document from an RPC (SOAP), I am turning it into a string (for serialization).
I want to use stylesheets to display the results on the client. Is there a utility which will turn this String back into a Document (or am I barking up the wrong tree)?


StringReader XMLStringReader = new StringReader(documentString ));
InputSource source = new InputSource(XMLStringReader);
then, use the source to get a document using DocumentBuilder.parse()
I am assuming that u meant org.w3c.Document as Document
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Turn a string (which is essentially a Document.toString())" back into a Document?
 
Similar Threads
Document to String
Binding XML to Java from SOAP message
Need help on resolving java.io.IOException: trailer not found.
How many String Objects
SAXException: Start root element expected.