[jdom-interest] help please GURUS.. !!!
Ken Rune Helland
kenh at csc.no
Mon Jun 4 09:44:16 PDT 2001
At 09:10 AM 6/4/2001 -0700, krishna muthyala wrote:
<SNIP>
>
> SAXBuilder sax = new SAXBuilder();
> doc = sax.build(XmlStream);
> Element root = doc.getRootElement();
>
<SNIP>
you are trying to use the XML string as a filename,
SAXBuilder.build(String) looks for a file matching the argument.
To do what you want you must wrap you String in a StringReader
SAXBuilder sax = new SAXBuilder();
doc = sax.build(new java.io.StringReader(XmlStream));
Element root = doc.getRootElement();
KenR
More information about the jdom-interest
mailing list