You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xerces.apache.org by Enrico Paolo Lelli <bc...@bca72.it> on 2001/12/04 12:06:07 UTC

Thanks Sridhar!!!

It works fine, you saved me!!
Thanks a lot!!!!!
Enrico.

At 15:33 04/12/2001 +0530, you wrote:
>InputStream inStream = new ByteArrayInputStream(nextBuf);
>org.xml.sax.InputSource inSource = new
>org.xml.sax.InputSource(inStream); //Creates the input source for
>parser.
>SaxParser sp = new SaxParser();
>sp.parse(inSource);
>
>The above code might work.
>
>regards,
>Sridhar.
>
>-----Original Message-----
>From: Enrico Paolo Lelli [mailto:bca72@bca72.it]
>Sent: Tuesday, December 04, 2001 3:24 PM
>To: xerces-j-user@xml.apache.org
>Subject: Need help
>
>
>
>Hi all, I'm looking for advices about Xerces Parser.
>In my code I have a client sending xml string: the server write down
>this
>string in a file and then give it to Xerces parser to process it.
>I would like to know if I might directly parse the string, without
>writing
>the file.
>Here is my actual code:
>
>dis.receive();
>command = dis.readUTF();
>byte [] nextBuf = command.getBytes();
>String fileName = "message.xml";
>FileOutputStream fos = new FileOutputStream(fileName );
>fos.write(nextBuf);
>SaxParser sp = new SaxParser(this);
>sp.performDemo(fileName );
>
>I would like something like this:
>
>dis.receive();
>command = dis.readUTF();
>SaxParser sp = new SaxParser(this);
>sp.performDemo(command );
>
>Please help!!! :))
>
>Tnx, Enrico.
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
>For additional commands, e-mail: xerces-j-user-help@xml.apache.org
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
>For additional commands, e-mail: xerces-j-user-help@xml.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org