question about xml

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top