C
C# newbie
Hi,
I've written a small program which using xpath finds some items into an xml
file. since I've used a query like
"//*[contains(translate(.,\"ABCDEFGHIJKLMNOPQRSTUVWXYZ\",
\"abcdefghijklmnopqrstuvwxyz\")," + "\"" + "Item I'm looking for" + "\")]
Long story short, the above query searches all sections of the xml file.
But I need to capture only paths which item has been found, of course there
are so many paths among that the item has not been within them but are
traversed anyway.
I tried to use substring to compare entered item (by user) with found item
as below but didn't give me what I was expecting:
if (xnode.Name.Substring(0, txtItemLookingFor.Text.Length) ==
txtItemLookingFor.Text)
How can I captrue only those paths which item has been encoutered ? and
ignore the rest ?
Your help would be appreciated greatly
Newbie
I've written a small program which using xpath finds some items into an xml
file. since I've used a query like
"//*[contains(translate(.,\"ABCDEFGHIJKLMNOPQRSTUVWXYZ\",
\"abcdefghijklmnopqrstuvwxyz\")," + "\"" + "Item I'm looking for" + "\")]
Long story short, the above query searches all sections of the xml file.
But I need to capture only paths which item has been found, of course there
are so many paths among that the item has not been within them but are
traversed anyway.
I tried to use substring to compare entered item (by user) with found item
as below but didn't give me what I was expecting:
if (xnode.Name.Substring(0, txtItemLookingFor.Text.Length) ==
txtItemLookingFor.Text)
How can I captrue only those paths which item has been encoutered ? and
ignore the rest ?
Your help would be appreciated greatly
Newbie