Click here to Skip to main content
15,895,777 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Dear friends,

I have defined xNodes as xmlnodelist, xmldoc as new xmldocument(). I have my xml file starting with parent node Volume
Each xml file will contain several Case ID =""tags.
I need to get the count of all these tags.
Therefore I use xNodes = xmlDoc.GetElementsByTagName("Case") to get the values. But the problem is I find some error in data i.e., Few nodes were printed as TCase instead of Case. Therefore my coding excludes the tags starts with TCase.
EG., In a xml file, totally I have 78 main nodes, 75 nodes starts with Case and 3 Cases starts with TCase. Since i use xNodes = xmlDoc.GetElementsByTagName("Case"), i receive only 75cases.
Is there any possibility to get the id values of both the tags? i.e., total of 78 cases????
Please help me ASAP.
Posted
Comments
Prasad Khandekar 18-Apr-13 3:22am    
Since you know that some nodes have tag name as TCase why not use GetElementsByTagName one more time with value as TCase?

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