[JDEV] <x> xml in jabberbeans

David Waite dwaite at jabber.com
Wed Jul 11 11:59:30 CDT 2001

Benjamin H Szekely wrote:

>sure, how should I file it?  Also, if I don't want the sax parser to parse
>the xml in the <x></x>, what is the cleanest way to implement my extension?
>Should I still be registering a handler in the in the properties.handlers
>file?  Or should I just get the toString() of the Extension?
>Alternatively, is there a way to tell the sax parser that I want they
>entire textual content of the <x></x> to be set as a field in my builder?
>The content of my <x></x> happens to be xml itself.  Thanks.
SAX parsers always parse the whole file (you actually have to, otherwise 
you can't be sure its valid XML). They also will convert default 
entities automatically.

There is a default extansion handler (called SerializingHandler, I think 
;-)) which just tracks and creates a string representation of the XML 
document. The problem is the default entities are not being unescaped 
back (in the characters(...) SAX callback function). There is an 
unescaping function within org.jabber.jabberbeans.XMLData

-David Waite

>  Ben
>jdev mailing list
>jdev at jabber.org

More information about the JDev mailing list