> One of the reason we discussed with Bernd during ApacheCon was that I
> needed a 'smart' XML parser, and Vysper obviously has one. The problem
> I had was that all the Java XML parsers I know of aren't able to stop
> parsing in the middle of a tag and start again without complaining
> with a hell lot of Exceptions.
>
> For instance, if you receive "<ta" when the full tag is "<tag>", then
> the parser will complain. I would expect the parser to simply returns,
> storing the current state somwhere, and restart smoothly when the next
> few bytes are received. Maybe this 'smart' statefull parser exist
> however...



> So let's suppose it does not exist : we need to extend some existing
> parser in order to accept the inherently fragmented nature of TCP
> messages. Otherwise, you have to do what Vysper does : pre-parse,
> heading for the closing '>', expecting that the user didn't
> encapsulate any comments in its XML file !

My code example has this flaw, that it was 2 stage parsing, first
collect the complete XML
and then use any parser Jibx or any XML Data binding framework to get the POJO
something similar to Vysper.

>
> Is this too much to ask for? Is there a java XML parser already
> wirking the way I want it to work ? If so, please tell me ! Otherwise,
> we might want to extend xerces, or something like XPP3
> (http://www.extreme.indiana.edu/xgws/xsoap/xpp/mxp1/index.html)
>
> wdyt ?

StAX parser can be a possible solution, though my experience is
limited wth StAX parsers.

http://en.wikipedia.org/wiki/StAX


Either way's, its very much doable and interesting :-)

What many people would like is use of a Data binding framework along
with, so the decoder has to be smart.
May be with a hook for easy customization.

-- 
thanks
ashish

Blog: http://www.ashishpaliwal.com/blog
My Photo Galleries: http://www.pbase.com/ashishpaliwal

Reply via email to