EnemyGateIsDown
Technical User
Hi Guys,
Im not sure whether I should post this here or on the C# forum but its really an XML issue.
I am new to XPath and am trying to find a node within my XML page which has an ID attribute of for example 'TestNode' so looking through documentation on XPath it seems that my statement should be:
[@id='TestNode']
I am running this using the C# command
xBody.SelectSingleNode(sxpath) where sxpath is a string containing the XPath statement above. However when I test this using my test page I get an error. I suspect that the problem is that my Xpath query is screwy. Can any of you XML chaps tell me what my statement needs to be in order to search all nodes within the document that have an ID attribute equal to X?
Any help is as always greatly appreciated.
Cheers,
Chris
Im not sure whether I should post this here or on the C# forum but its really an XML issue.
I am new to XPath and am trying to find a node within my XML page which has an ID attribute of for example 'TestNode' so looking through documentation on XPath it seems that my statement should be:
[@id='TestNode']
I am running this using the C# command
xBody.SelectSingleNode(sxpath) where sxpath is a string containing the XPath statement above. However when I test this using my test page I get an error. I suspect that the problem is that my Xpath query is screwy. Can any of you XML chaps tell me what my statement needs to be in order to search all nodes within the document that have an ID attribute equal to X?
Any help is as always greatly appreciated.
Cheers,
Chris