here is a sample
try {
String myXML ="<tag>Valid xml </>" ;
SAXParser parser = SAXUtil.getSAXParser();
StringReader sr = new
StringReader(myXml.trim());
InputSource is = new InputSource(sr);
parser.parse(is, handle);
}
Vasanth
-----Original Message-----
From: Murphy, Ed [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 21, 2005 2:55 PM
To: [email protected]
Subject: RE: Parse XML doc in a string using DOM?
It can also take an XMLInputSource. Sounds like that's what you need.
Ed
-----Original Message-----
From: Kervin L. Pierre [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 21, 2005 1:50 PM
To: [email protected]
Subject: Parse XML doc in a string using DOM?
Hello,
I thought this would be simple, but I can't
find any examples. I am receiving an XML
document in the form of a string and would
like to parse that document. But
Parser.parse() only takes a filename right?
How do I parse a XML document that is already
in memory?
Thank you,
Kervin
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED] This
e-mail and any attachments are intended only for use by the
addressee(s) named herein and may contain legally privileged and/or
confidential information. If you are not the intended recipient of this
e-mail, you are hereby notified any dissemination, distribution or
copying of this email, and any attachments thereto, is strictly
prohibited. If you receive this email in error please immediately notify
the sender and permanently delete the original copy and any copy of any
e-mail, and any printout thereof.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
-----------------------------------------
This e-mail may contain confidential or privileged information. If you
think you have received this e-mail in error, please advise the sender by
reply e-mail and then delete this e-mail immediately. Thank you. Aetna
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]