Re: XmlSerializer question

Aleksander Slominski <[email protected]> Wed, 21 May 2003 13:02:59 -0500
Newsgroups gmane.text.xml.xmlpull.devel
Message-ID <[email protected]>
Matt Tucker wrote:

> First, many thanks for your work on XPP and the XML pull API. They've 
> been a great help to us at Jive Software. 

hi,

nice to hear it :-)

> I've been working on a roundtrip problem using XmlSerializer and 
> wanted to suggest that you expose the closeStartTag() method in the 
> XmlSerializer API. Having access to it is critical for certain usages 
> like ours, where the XML is streaming (I work on an Open Source client 
> library for XMPP/Jabber).

sounds interesting - in what stage is it now?

> For now, I've worked around the problem with:
>
>    class MySerializer extends MXSerializer {
>         public void endStartTag() throws IOException {
>             closeStartTag();
>         }
>     }
>
> which works fine. However, others might run into similar problems so I 
> thought it would be worth suggesting a change in the API. 

i think you can get the same behavior by calling flush() or text("") as
both methods will call close tag (the difference is that text() will
write no output and will not flush iunderlying output stream)?

could you try and let me know if it worked for you? it owuld be good to
make sure that XmlSerializer  works well for streaming.

also if you use XmlSerializer you may consider XmlSerializerWrapper that
is addon to XmlPull API and is npow part of XPP3 1.1.3.1, this interface
adds new useful methods to wite more XML in less amount of code (such as
frgment()) for more details see:
http://www.xmlpull.org/v1/doc/addons.html#wrapper

thanks,

alek

-- 
"Mr. Pauli, we in the back are all agreed that your theory is crazy.
What divides us is whether it is crazy enough to be true." Niels H. D. Bohr




------------------------ Yahoo! Groups Sponsor ---------------------~-->
Get A Free Psychic Reading!
Your Online Answer To Life's Important Questions.
http://us.click.yahoo.com/aM1XQD/od7FAA/uetFAA/2U_rlB/TM
---------------------------------------------------------------------~->

To unsubscribe from this group, send an email to:
[email protected]

 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/