Click here to Skip to main content
Rate this: bad
Please Sign up or sign in to vote.
See more: XML VB.NET
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 17-Apr-13 22:10pm
Prasad Khandekar at 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)

  Print Answers RSS
0 OriginalGriff 575
1 Maciej Los 555
2 Sascha Lefévre 264
3 Suvendu Shekhar Giri 229
4 Richard Deeming 195
0 Sergey Alexandrovich Kryukov 9,693
1 OriginalGriff 9,185
2 Peter Leow 5,112
3 Kornfeld Eliyahu Peter 3,373
4 Maciej Los 2,876

Advertise | Privacy | Mobile
Web01 | 2.8.150327.1 | Last Updated 18 Apr 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100