View Full Version : xPath question

03-06-2010, 04:58 PM
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, 04:09 PM
if SelectNodes() accepts only an XPath expression, this is certainly wrong. conditions you have to define in []

// final XPath expression
// note that index numbers start with 1