Click here to Skip to main content
11,705,610 members (47,387 online)
Rate this: bad
good
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 21:10pm
Comments
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 229
1 Sergey Alexandrovich Kryukov 100
2 Inimicos 60
3 ProgramFOX 50
4 Richard MacCutchan 45
0 OriginalGriff 9,053
1 Sergey Alexandrovich Kryukov 8,347
2 CPallini 5,189
3 Maciej Los 4,726
4 Mika Wendelius 3,626


Advertise | Privacy | Mobile
Web01 | 2.8.150819.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