This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell 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


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
 
GeeCON Prague 2014
 
subject: Turn a string (which is essentially a Document.toString())" back into a Document?