OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Can a stream other than the uri and file be passed to the parsemethodin SAX ???



In short, yes you can.  Have a look at the class sax.InputSource.

Assuming you are using the java language, if you have a character buffer
then you can construct the sax.InputSource with a java.io.Reader.  Depending
on how you have implemented your buffer you can use one of the derivations
of java.io.Reader such as CharArrayReader.  Alternatively, if you have a
buffer of bytes that requires further decoding into characters then you can
construct the sax.InputSource from a java.io.InputStream (again look at the
derivations - one of them will be suitable for you - perhaps
ByteArrayInputStream).

Regards
Rob Lugt
ElCel Technology

----- Original Message -----
From: "Sandeep" <sandeep.gain@riverrun.com>
To: <xml-dev@lists.xml.org>
Sent: Friday, February 23, 2001 8:31 AM
Subject: Can a stream other than the uri and file be passed to the parse
methodin SAX ???


> I mean to say that I have XML content in a buffer and I don't want to
store
> it in a file and then give the file stream as input to the
> parser as input . Can the buffer be directly passed to the parser.....
>
>
> ------------------------------------------------------------------
> To unsubscribe from this elist send a message with the single word
> "unsubscribe" in the body to: xml-dev-request@lists.xml.org
>
>