aspose file tools*
The moose likes JSP and the fly likes A parsing challenge I am stuck Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "A parsing challenge I am stuck" Watch "A parsing challenge I am stuck" New topic
Author

A parsing challenge I am stuck

Ray Smilgius
Ranch Hand

Joined: Jan 29, 2001
Posts: 120
I can parse a file or an InputStream without no problems, but I call a function which returns an xml string and I need to parse this
String strMe = "localhost";
Document doc;
DocumentBuilderFactory dbf=DocumentBuilderFactory.newInstance();
DocumentBuilder db=dbf.newDocumentBuilder();
String parseme = hostLookup.LookupAddress(strMe);
doc=db.parse(parseme);
I get a SAXException not found the string is returning ok but I need to parse the string not a file I dont want to put it in a file if I did it would work but is there a way to build an InputStream with this strMe string
Thanks in Advance
Ray
[ March 13, 2002: Message edited by: Ray Smilgius ]

SCJO, SCJD, SCWCD, I-Net+, A+, Network+, MCSD, MCDBA, MCP, MCT
James Swan
Ranch Hand

Joined: Jun 26, 2001
Posts: 403
Ray Smilgius
Ranch Hand

Joined: Jan 29, 2001
Posts: 120
Thanks James,
That did the trick.

Ray
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: A parsing challenge I am stuck