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 "Jesus M. Salvo Jr." <js...@powerserve.com.au> on 2001/02/06 04:57:42 UTC
Howto: SAX Serializer
First, not sure this is the right place to send this question, but the feedback did say to use this mailing list:
http://xml.apache.org/xerces-j/feedback.html
Here is my question:
I know SAX is mostly often used for parsing, but what caught my attention was the Javadoc for XMLSerializer
which stated:
-----------------------
The serializer supports both DOM and SAX. DOM serializing is done by
calling |BaseMarkupSerializer.serialize(org.w3c.dom.Element)|
<../../../../org/apache/xml/serialize/BaseMarkupSerializer.html#serialize(org.w3c.dom.Element)>
and SAX serializing is done by firing SAX events and using the
serializer as a document handler.
-----------------------
What I can not figure out is exactly howto do this. Because:
1) org.apache.xml.serialize.XMLSerializer is declared final.
2) Some of the "events" are protected, such as "protected startDocument( String )" and
"protected serializeElement( Element )".
Does anyone has a sample on using SAX serialization? ... or a link somewhere?
Thanks,
John
Re: Howto: SAX Serializer
Posted by arkin <ar...@intalio.com>.
> 2) Some of the "events" are protected, such as "protected startDocument( String )" and
> "protected serializeElement( Element )".
SAX events are not protected. startDocument(String) and
serializeElement(Element) are internal methods. SAX defines
startDocument(), while serializing a DOM element is done using
serialize(Node).
arkin
>
> Does anyone has a sample on using SAX serialization? ... or a link somewhere?
>
> Thanks,
>
> John
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-j-dev-help@xml.apache.org
--
----------------------------------------------------------------------
Assaf Arkin arkin@intalio.com
CTO, Intalio Inc. www.intalio.com
The Business Process Management Company (650) 345 2777