Hi,
 I have a servlet that uses COS send a post to another servlet. I've
included a parameter called "XMLMSG" which contains a string, which is valid
XML. The servlet at the other end can pick out the XML with

        String xmlrequest = req.getParameter("XMLMSG");

This all works fine. However, I want to Parse this XML message, preferably
using a SAX Parser - but the parameters to the Parse function are either a
org.xml.sax.InputSource or a java.lang.String (identifying the systemid). I
want to actually parse the String xmlrequest itself.

I can see only one solution so far - have the listening servlet write the
string to a filesystem temp file, then provide the known URI to this temp
file as a String. However - this doesn't seem particuarly elegant, and will
probably impact the performance, as there will definately be a write to the
disk.

Can anybody think of a better solution, i.e. a parser that allows me to
parse a string? I have a feeling that there could be a simple answer to this
(such is life).

My apologies if this is slightly offtopic, but I've posted to the
xml-interest sun list, and recieved only a reply saying tha the list is
currently "held". This has obviously not helped :-)


Regards,

Tim

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to