Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can we have node count on each node #1

Closed
ghost opened this issue May 5, 2016 · 2 comments
Closed

Can we have node count on each node #1

ghost opened this issue May 5, 2016 · 2 comments

Comments

@ghost
Copy link

ghost commented May 5, 2016

Please provide node count on each node

@lovettchris
Copy link
Member

Ok, there are lots of different ways one could do this, can you clarify? You want some sort of "stats" about the number of repeated nodes? Is that nodes in a similar position (.e.g all instances of "c" that match the path "/a/b/c") or is that just all nodes with the same name "c" anywhere in the tree? For example, one way to do this would be to infer the XSD schema then count the number of times each type in the schema is being used. If there is a real XSD schema, then use that and report the stats. Then do you really want the stats on screen all the time, or do you want a separate page reporting the stats for the entire schema? Then there's lots of other interesting stats we could throw in for free, like total amount of text, total number of nodes, number of attributes, averages, etc, etc... I actually have an xmlstats package that produces a report like this:

*** XmlStats   (16.32 msecs)

elements
  unique                    25
  empty                    273
  total                   2170
  chars                  60780
attributes
  unique                     7
  total                   1015
  chars                  46193
comments
  total                      3
  chars                    363
PIs
  total                      0
  chars                      0
whitespace
  chars                  30131
  significant                0

elem/attr                count     chars
----------------------------------------
assembly                     1         0
c                           34       799
code                         3       137
dd                          76         0
doc                          1         0
exception                   10       273
  @cref                     10       332
inheritdoc                  18         0
member                     518         0
  @name                    518     33035
members                      1         0
msdn-id                     83       664
name                         1        15
p                           87      5689
param                      217      5770
  @name                    217      2081
paramref                     6        79
  @name                      6        24
pre                          3         0
remarks                     33      3280
returns                     86      1525
see                        244      8111
  @cref                    244     10517
seealso                      5         0
  @cref                      5       189
strong                      10       130
summary                    501     29147
typeparam                   15       440
  @name                     15        15
unmanaged                  101      2273
unmanaged-short            100      2224
value                       16       224

*** XmlStats ended.

@lovettchris
Copy link
Member

Did hear anything back from you, so I added this "xml stats" report under the View menu. Hope it helps.

rtigithub referenced this issue in rtigithub/XmlNotepad Sep 6, 2021
Merge microsoft/XmlNotepad updates
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant