XPATH query to get the child elemets of a node
-
Hi, Heres a sample XML document: A M B 1 If i get the count of childnodes of the node , using the following statement: xmlNamenode.Childnodes.count, it returns 6 (i.e) it also includes the comments as a child node. Is there any way to directly get the count of number of elemets (excluding comment nodes) instead of alll the childnodes? Thanks and Regards Madhu
-
Hi, Heres a sample XML document: A M B 1 If i get the count of childnodes of the node , using the following statement: xmlNamenode.Childnodes.count, it returns 6 (i.e) it also includes the comments as a child node. Is there any way to directly get the count of number of elemets (excluding comment nodes) instead of alll the childnodes? Thanks and Regards Madhu
Maybe this one
document.SelectNodes("/*").Count
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook
-
Maybe this one
document.SelectNodes("/*").Count
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook