Simplest way to get XML node count

I found this online tool that you may find useful: http://www.freeformatter.com/xpath-tester.html. Examples are included on the same page.


To elaborate on the Notepad++ answer, you can also use the Count button in the search dialogue box. My XML file has thousands of nodes and it gave me the count of a particalur <node>value</node> in a couple of seconds. The find all option was less useful because it shows by line so my node got hidden away.

The final alternative I found was the Mark option which will mark the string and (optionally) set a bookmark. The bookmark doesn't solve the problem when a node and children are on a single line but you can at least jump to the next line with the marked text by pressing F2.

Added: This works ok when you have lots of the same values but if you're trying to discover the different values you need a way to exclude. I ended up searching with a Regular Expression to filter out the values I found as I went along so <node>(?!Value1|Value2|Value3).*</node> The group excludes the values that you have found

I just keep coming back to Notepad++ for these jobs, it's a wonderful program