[xml] Count elements using XmlReader
- From: Oliver Heyme <oheyme gmx de>
- To: xml gnome org
- Subject: [xml] Count elements using XmlReader
- Date: Sun, 29 Oct 2006 18:55:48 -0100
Hi,
I have XML-files doing something like this:
<array>
<item data="..."/>
<item data="..."/>
...
<item data="..."/>
<item data="..."/>
</array>
and I am using the xmlReader!
The problem is that I would like to know how many "item" elements are
between the array-tags!
Is there any possibility to do this without adding a "size"-attribute
to the opening array-tag!
My XML-files can become very big that's why I don't want to use
anything else then the xmlTextReader.
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!
HELP!!! PLEASE!!!
Kind regards,
Oliver Heyme
----
rayGina::CORE developer
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]