Skip to content

JohnLucid1/sir

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

XML Node Counter

This is a Go application that parses an XML file or an XML response from a URL, counts the child nodes for each XML element, and prints the counts to the console.

Installation

  1. Make sure you have Go installed on your machine.
  2. Clone this repository or copy the source code into your working directory.
  3. Build the project using the following command:
    go build -o sir

Usage

Command Line Arguments

The application accepts a single argument that specifies the path to an XML file or a URL containing an XML response.

Syntax

./sir <filepath/url>

Examples

  1. Processing a local XML file:

    ./sir sample.xml
  2. Processing an XML from a URL:

    ./sir https://example.com/sample.xml

Sample Output

For an input XML file or URL containing:

<root>
  <child1>
    <subchild1 />
  </child1>
  <child2 />
</root>

The output will be:

root: 2
child1: 1

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages