Re: [xml] Count elements using XmlReader



On Sun, Oct 29, 2006 at 06:55:48PM -0100, Oliver Heyme wrote:
I thought about doing something like saving the xmlTextReaderPtr and  
that parse on until I found the closing array-tag to count the  
elements. Afterwards I wanted to start from the saved position again!  
But I could not get it to work!

  You cannot go back on parsing, there is no API in libxml2 doing this.
If the XML forces you to do 2 parsing it's a design error either on
the producer or on the consumer side.

Daniel

-- 
Red Hat Virtualization group http://redhat.com/virtualization/
Daniel Veillard      | virtualization library  http://libvirt.org/
veillard redhat com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine  http://rpmfind.net/



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