Search code examples
xmlxpathxmlspy

Count the number of nodes that match a given XPath expression in XmlSpy


I am using XmlSpy to analyze an xml file, and I want to get a quick count of the number of nodes that match a given xpath. I know how to enter the XPathand get the list of nodes, but I am really just interested in the count. Is it possible to get this?

I'm using XmlSpy Professional Edition version 2007 sp2, if it matters.


Solution

  • I just figureed it out. I just needed to put count() around my xpath, like so:

    count(//my/node)