Skip to content

dbunta/ideal-potato

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 

Repository files navigation

XmlParseAndCount

Parses XML files in specified or working directory. Groups on defined set of div types and return counts of div tags by type, note tags by parent div tag types, instanced note tags by parents div tag types.

Optional Arguments

-s --Source
source directory in which the XML files are located
If no source argument is specified, the script will look in the directory where it is located for XML files 

-f --Filename
output filename (CSV file)
If no filename argument is specified, the script has a default filename

E.g.

Sample XML

<div type="section">
    <div type="article">
        <note></note>
        <note></note>
    </div>
    <div type="article">
        <note></note>
    </div>
</div>

Sample Results

Total Counts

TotalDivCount TotalNoteCount
3 3

Total <div> Counts by Type

DivsOfType_Section DivsOfType_Article
1 2

Total <note> Counts by Parent Div Type

NotesInDivOfType_Section NotesInDivOfType_Article
3 3

Total <note> Counts by Parent Div Type and Instance

NotesInDivOfTypeAndInstance_Section_1 NotesInDivOfTypeAndInstance_Article_1 NotesInDivOfTypeAndInstance_Article_2
3 2 1

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages