xml-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Joe Sabu" <Joe.S...@dothill.com>
Subject Re: String to Document using Xerces 1.0.3
Date Wed, 23 Aug 2000 20:59:04 GMT
I guess you can construct an InputSource from a String

for e.g.,InputSource ip = new InputSource(new StringReader(your-string-here)

Is this what you wanted?

----- Original Message -----
From: <MMcBride@therealm.com>
To: <XML-INTEREST@JAVA.SUN.COM>; <general@xml.apache.org>
Sent: Wednesday, August 23, 2000 11:35 AM
Subject: String to Document using Xerces 1.0.3

I am attempting to read a string (myXML) containing XML into a document
without storing it in a file.  Ultimately, I will need to parse the
document with the DOMParser from Xerces 1.0.3.

Here is a fragment of what I have so far:

DOMParser myParser = new DOMParser();
document = myParser.getDocument();

Now, the DOMParser parse method only takes an InputSource parameter.  I
think my question is "how can I take the string into an InputSource
parameter?"  However, if there is another way of doing this, please feel
free to pass it along!  Thanks for the help...



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

View raw message