Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

sspbond007

macrumors member
Original poster
Aug 19, 2008
46
0
Hi,

I'm parsing an Xml file and every thing is working fine. :)
I want to get number of specific element in xml data.
Say I have an Xml file having data of books

<Books>
<Book>
<Name>ABC</Name>
<Author>xyz</Author>
<Cost>$20</Cost>
</Book>

<Book>
<Name>ABC2</Name>
<Author>xyz2</Author>
<Cost>$20</Cost>
</Book>

<Book>
<Name>ABC3</Name>
<Author>xyz3</Author>
<Cost>$20</Cost>
</Book>
</Books>

I want the count of Book element, without parsing whole document.

Please help.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.