microsoft / XmlNotepad

XML Notepad provides a simple intuitive User Interface for browsing and editing XML documents.
https://microsoft.github.io/XmlNotepad/
MIT License
980 stars 207 forks source link

XMLStats and employee.xml #254

Closed Pierre-de-la-Verre closed 1 year ago

Pierre-de-la-Verre commented 1 year ago

I suppose that I don't understand enough of XML, but asking for "Country I get this:

C:\Users\..\AppData\Local\Temp\XmlNotepad>xmlstats -s Country "c:\Program Files (x86)\LovettSoftware\XmlNotepad\Samples\Employee.xml"
*** XmlStats 2.9.0.0 by Chris Lovett and Andreas Lang

*** c:\Program Files (x86)\LovettSoftware\XmlNotepad\Samples\Employee.xml

Processed in 12.00 msecs

elements
  unique                     2
  empty                      0
  total                     14
  chars                      6
attributes
  unique                     0
  total                      0
  chars                      0
comments
  total                      0
  chars                      0
PIs
  total                      0
  chars                      0
whitespace
  chars                     14
  significant                0

elem/attr                count     chars
----------------------------------------
Country                      1         0
Name                         2         6

Name is an element of Country, but only 1. The other "Name" is from Employee. So is it correct to display "Name 2" when Country has only 1?

lovettchris commented 1 year ago

Good bug, thanks.

lovettchris commented 1 year ago

Fixed in https://github.com/microsoft/XmlNotepad/releases/tag/2.9.0.1