Re: [xml] saving parser state

Date view Thread view Subject view Author view

From: Daniel Veillard (Daniel.Veillard@w3.org)
Date: Tue Apr 04 2000 - 20:29:40 EDT


On Tue, Apr 04, 2000 at 02:59:51PM -0700, Brian Craft wrote:
>
> With libxml is there a way to 1) save the state of the parser & later restore
> it, or 2) back up to a known state after an error?
>
> I'm wanting to parse xml which is arriving asynchronously in some
> atomic units. If one unit has bad xml, the parser needs to toss it & wait for
> the next one, but not lose entity definitions, etc.

  Not really, but there is a new function call in libxml2
xmlParseBalancedChunkMemory()
  which produces a set of childs that would be the result of
parsing a well balanced chunk of XML within a given context.

  http://xmlsoft.org/gnome-xml-parser.html#XMLPARSEBALANCEDCHUNKMEMORY

  I notice that for some reason the doc didn;t get extracted right
from the function header though.

Daniel

-- 
Daniel.Veillard@w3.org | W3C, INRIA Rhone-Alpes  | Today's Bookmarks :
Tel : +33 476 615 257  | 655, avenue de l'Europe | Linux XML libxml WWW
Fax : +33 476 615 207  | 38330 Montbonnot FRANCE | Gnome rpm2html rpmfind
 http://www.w3.org/People/all#veillard%40w3.org  | RPM badminton Kaffe
----
Message from the list xml@xmlsoft.org
Archived at : http://xmlsoft.org/messages/
to unsubscribe: echo "unsubscribe xml" | mail  majordomo@xmlsoft.org


Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Wed Aug 02 2000 - 12:30:09 EDT