xml-paths

Crates.ioxml-paths
lib.rsxml-paths
version0.1.2
sourcesrc
created_at2022-02-07 14:26:16.172591
updated_at2022-02-07 14:43:27.642488
descriptionTool to quickly see the structure of an xml file by listing all the tag paths present in the file.
homepage
repositoryhttps://github.com/dhbradshaw/xml-paths
max_upload_size
id528438
size7,625
Douglas H. Bradshaw (dhbradshaw)

documentation

README

xml-paths

If you have a large xml file, it can be useful to try to understand the structure by getting a map of all the possible element paths.

An easy way to do that is by using this tool.

Installation

cargo install xml-paths

Usage

Just run the command and give it a file to parse.

For example, if we have an xml file at path/to/my/xml_file.xml that looks like

<notes>
    <note>
        <to>Gina</to>
        <from>Doug</from>
        <heading>Thanks</heading>
        <body>Lunch was amazing!</body>
    </note>
    <note>
        <to>Doug</to>
        <from>Gina</from>
        <heading>Thanks</heading>
        <body>Thanks Doug! I liked it too -- that's a definite repeat!</body>
    </note>
</notes>

,

we run

xml-paths path/to/my/xml_file.xml

to get

/
/notes
/notes/note
/notes/note/body
/notes/note/from
/notes/note/heading
/notes/note/to
Commit count: 13

cargo fmt