Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
Thread: xPath question
03-06-2010, 03:58 PM #1
- Join Date
- Mar 2010
- Thanked 0 Times in 0 Posts
i'm currently working on a project in VB.NET. the xml structure i want to query looks something like this:
now, would an xpath expression like this
xmldoc.DocumentElement.SelectNodes("/cid/c" & c_index & "//id")
work to select all the "id"-nodes that are childnodes of one specific "c[anynumber]" node, where c_index is the number i want to look at?
sorry for the kinda confusing description, but i dont really know how to explain it better.
thanks a lot,
03-08-2010, 03:09 PM #2
- Join Date
- Jan 2010
- Behind the Wall
- Thanked 345 Times in 341 Posts
if SelectNodes() accepts only an XPath expression, this is certainly wrong. conditions you have to define in 
Code:// final XPath expression // note that index numbers start with 1 /cid/c[c_index]/id
The computer is always right. The computer is always right. The computer is always right. Take it from someone who has programmed for over ten years: not once has the computational mechanism of the machine malfunctioned.André Behrens, NY Times Software Developer