On Nov 27, 2006, at 8:58 AM, Olle Jonsson wrote:

> On Nov 26, 2006, at 10:18 PM, Laurent Sansonetti wrote:
>
>> Hi guys,
>>
>> I just had the need to parse a very big XML file from Ruby, and the
>> available libxml-ruby APIs didn't seem to be efficient and flexible
>> enough for this task. So I added bindings to the xmlTextReader API to
>> the project, just for my need, and it appears to work pretty well.
>
> I didn't know about the XmlTextReader, so I read stuff about it [0]
> -- and it looks good to me. (Python already supports it.)
>
> The C# page [1] says: "This class provides forward-only, read-only
> access to a character stream of XML data. This class enforces the
> rules of well-formed XML but does not perform data validation."
>
> Laurent, have you begun with the wellformedness validation stuff, too?
>

Actually at a glance it's possible to provide some kind of data  
validation stuff (either RelaxNG or XSD schemas) when initializing the  
reader, and the data will be validated when walking through the file  
(as one goes along). I never tested this though.

Also, it's possible to connect a callback to the reader that will be  
called in the given XML stream has processing errors. Didn't test it  
as well.

Laurent
_______________________________________________
libxml-devel mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/libxml-devel

Reply via email to