question about xml

  • Thread starter Thread starter C# newbie
  • Start date Start date
C

C# newbie

Hi group,

I have an xml file as:

<AAA>
<BCC>
<BBB/>
<data>'Test'</data>
<BBB/>
<BackGroundColor>'Test'</BackGroundColor>
<BBB/>
</BCC>
<DDB>
<BBB/>
<BBB/>
</DDB>
<BEC>
<CCC/>
<OtherInfo>'Test'</OtherInfo>
<Also>'Test'</Also>
<DBD/>
</BEC>
</AAA>

when I use xpath query as //*[contains(.,"Test")], it should find all
"Test" words within the xml file. In my C# code I have used
"SelectSingleNode" Method and also grab the parent of the found nodes. The
thing which sounds weird to me, is that it shows BCC DDB BEC as
ancestors!!! but why it shows DDB?

Your help would be appreciated.
NewBie
 
Back
Top