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.


Red Hat Virtualization group
Daniel Veillard      | virtualization library
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]