M
Markus Wallner
Hi!
Can some XPath expert please answer the following question:
How can I quickly check if a set of nodes do all have the same parent
node?
For example (i)
<table name="X" >
<field name="a" />
<field name="b" />
</table>
<table name="Y" >
<field name="c" />
<field name="d" />
</table>
Question: Do the nodes a, b, c and d all have the same parent node?
No, they do not in this example.
For example (ii)
<table name="X" >
<field name="a" />
<field name="b" />
</table>
Question: Do the nodes a and b all have the same parent node?
Yes, they do in this example.
How can I express that question in XPath? Of course I could retrieve
all field-nodes and then iterate over them and check but I wonder if
there is a quicker way.
Programming language: C#, VS .NET 2003
Thanks a bunch!
Markus
Can some XPath expert please answer the following question:
How can I quickly check if a set of nodes do all have the same parent
node?
For example (i)
<table name="X" >
<field name="a" />
<field name="b" />
</table>
<table name="Y" >
<field name="c" />
<field name="d" />
</table>
Question: Do the nodes a, b, c and d all have the same parent node?
No, they do not in this example.
For example (ii)
<table name="X" >
<field name="a" />
<field name="b" />
</table>
Question: Do the nodes a and b all have the same parent node?
Yes, they do in this example.
How can I express that question in XPath? Of course I could retrieve
all field-nodes and then iterate over them and check but I wonder if
there is a quicker way.
Programming language: C#, VS .NET 2003
Thanks a bunch!
Markus