StringWriter stringOut = new StringWriter(); //create your string representation of the XML file
strReader = new StringReader(stringOut.toString()); source = new InputSource(strReader); Then pass the InputSource to the parser. Thanks, Rob -----Original Message----- From: Vincent Wolowski [mailto:[EMAIL PROTECTED] Sent: Monday, June 10, 2002 8:19 AM To: [EMAIL PROTECTED] Subject: DomParser.parse(): How do I pass in a String as the XML document? Hi, I'm using the Apache Xerces DomParser. I know how to parse an XML file. DOMParser parser = new DOMParser(); parser.parse("file:///c:/tmp.xml"), but how can I parse a String that represents an XML document, e.g. parser.parse("<?xml version="1.0"?> <ReportingEvents>...")? Thanks a lot for any help! Vincent --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
