You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by Michael Glavassevich <mr...@ca.ibm.com> on 2012/07/09 04:19:05 UTC
Re: GSoC status
Hi Shakya,
The XMLSerializer writes the document to an OutputStream or Writer. Before
you call parse you need to set that on the XMLStreamWriter (e.g.
XMLSerializer.setOutputByteStream(new ByteArrayOutputStream()). After
parse, the document will have been written to the OutputStream. If you use
a java.io.ByteArrayOutputStream, you would call toByteArray() to get the
document after parse and then could wrap that into a
java.io.ByteArrayInputStream which you could pass back to the
XMLInputSource.
Thanks.
Michael Glavassevich
XML Technologies and WAS Development
IBM Toronto Lab
E-mail: mrglavas@ca.ibm.com
E-mail: mrglavas@apache.org
Shakya Wijerama <sh...@gmail.com> wrote on 08/07/2012 01:50:09
PM:
> Hello Michael,
>
> In my custom SAXContenthandler I used the XMLSerializer rather than
> the SchemaDOMParser. Then I set the ContentHandler to the parser. In
> the custome content handler i forwarded all the calls to the
> XMLSerializer. But after I parse the input source, how can I get the
> Document from the content handler?
>
> Thanks.