Click here to Skip to main content
15,922,007 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hello Friends



How it is possible to count total number of records are present in my xml file.

Regards

AmyAli
Posted
Comments
Fredrik Bornander 2-Jul-13 17:50pm    
Using what language, C#, Java, C++?
What do you mean by record? Do you mean element?
Can you show us a sample of your XML and what in it it is you want to count?

1 solution

XML does not support the concept of "record", so, there is nothing to count; and this is an ambiguous or incorrect question.

XML represent a tree structure of notes called "elements". You can count then (or, say, number of elements on each tree level, or something else related to the number of elements) using nearly any XML parser. It depends on what platform/language/library you can use.

—SA
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900