Re: [xml] End of document with push parser

On Wed, Aug 31, 2005 at 10:25:29AM +0200, Jérôme Marant wrote:
So, if there is exactly one root element and if the client does not send
any Misc, I guess that detecting the end of the root element should
indicate that I received the whole request, right? Would redefining
endElementSAXFunc for such a purpose do the trick?
Or, what am I not understanding?

  That your parser is not an XML parser anymore but for a subset of XML.
You can hack all you want but this won't be handled in a standard fashion,
which also mean you're pretty much on your own for debugging in case of
problems. Libxml2 push API requires to indicate the end of stream on the last
push. This changes the behaviour, if you don't you don't have garantee that
all errors will be caught, and you're on your own to debug those case. I
just want to be very clear upfront about it.


Daniel Veillard      | Red Hat Desktop team
veillard redhat com  | libxml GNOME XML XSLT toolkit | Rpmfind RPM search engine

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]