Skip to content

A small python script to format (pretty print) multiple xml files at once.

Notifications You must be signed in to change notification settings

prefixFelix/mass-xml-formatter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

Mass / Bulk XML formatter

A small python script to format (pretty print) multiple XML files at once.

⚠️ Python version 3.9 or higher is required!

Usage

./format-xml.py --input INPUT_DIR [--output OUTPUT_DIR] [--ignore-subdirs]

  • input
    • Path to the input directory which contains the XML files.
  • output
    • Path to the directory where the formatted XML files should be saved. If none is specified, a new one will be created automatically.
  • ignore-subdirs
    • If this flag is set, only files from the specified directory are formatted. Files in nested directories are ignored.
./format-xml.py -i input-dir -o output-dir
/home/user/Documents/input-dir/document-one.xml
--->
/home/user/Documents/output-dir/document-one.xml

/home/user/Documents/input-dir/nested/document-two.xml
--->
/home/user/Documents/output-dir/nested/document-two.xml

+-----------------------+
Formatted files: 2
+-----------------------+

About

A small python script to format (pretty print) multiple xml files at once.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages