.net XPath expressions
Hi, I'm working with a treeview representation of a xml-document with nested elements.
If the user tries to delete a node I want to alert him that he is trying to delete
<xsl:value-of select="count(descentant-or-self::node())" />
nodes. He will also be able to cancel the request.
The problem arises when I want to count the descendants in .net:
selectedXmlNode.SelectNodes("descendant-or-self::node()").Count
because the value returned is the number of children, not descendants.
Why does this happen?
|