https://github.com/nullfx/xsltrans
a simple xml transform command line utility
https://github.com/nullfx/xsltrans
Last synced: 8 months ago
JSON representation
a simple xml transform command line utility
- Host: GitHub
- URL: https://github.com/nullfx/xsltrans
- Owner: nullfx
- License: mit
- Created: 2021-03-03T19:35:31.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-07-27T23:46:17.000Z (almost 5 years ago)
- Last Synced: 2023-02-27T21:13:28.577Z (over 3 years ago)
- Language: C#
- Size: 18.6 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# xsltrans - An XML Transform Utility
A simple utility for applying an [XSLT](https://www.w3.org/TR/xslt/) stylesheet to one or more XML files conceptually similar to [xsltproc](http://xmlsoft.org/xslt/xsltproc.html). The utility can be run on a single XML file or by specifying a folder containing multiple XML files with a search pattern.
## Command Line Args
| Short | Long | Description |
| ------|------|-------------|
|\-x| \--xslt| XSLT File Path|
|\-f| \--file|XML File to transform (cannot specify both file and folder)|
|\-F| \--folder|Folder path containing XML Files to transform (cannot specify both file and folder)|
|\-i| \--include|When transforming XML files by folder specify file extensions to include (ex: -i *.xml or --include *.xml)|
|\-o| \--out|Output file path|
|\-h| \--help|Displays the help|
## Examples
### Batch transform
```bash
$ xsltrans -x ~/xml2csv.xslt -F ~/my_xml_files -o ~/output.csv
```
### Batch transform with search filter
```bash
$ xsltrans -x ~/xml2txt.xslt -F ~/my_xml_files -i *02_2020.xml -o ~/output.txt
```
### Single File
```bash
$ xsltrans -x ~/xml2html.xslt -f ~/my_doc.xml -o ~/output.html
```