Simplest way to get XML node count [closed]

I have some XML files for which I want to get the count of nodes. However, I don't want to go and start coding. I have checked some XML tools like Notepadd++ XML Plugin, Cygwin xmllint, XML Notepad 2007, but none of them provide this feature.

Basically, I need kind of a summery count of nodes. Is there any software that can do that? Googling seems to only provide solution that require programming.


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


In some simple cases, the easiest way is to open XML file in a web browser window (e.g. Chrome displays XML tree), then count items using 'find on page' function (usually CTRL+F or CMD+F) and paste your node identity string like this <o id= for nodes like that <o id="18" url="...">...</o>. The browser will count found occurrences for you. Essentially, any text editor will do that job also.