Giter Club home page Giter Club logo

Comments (2)

lovettchris avatar lovettchris commented on May 18, 2024

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.

from xmlnotepad.

lovettchris avatar lovettchris commented on May 18, 2024

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

from xmlnotepad.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.