An open API service indexing awesome lists of open source software.

https://github.com/t1st3/muxml-cli

Streaming XML parser and formatter
https://github.com/t1st3/muxml-cli

cli formatter parser stream xml

Last synced: 5 months ago
JSON representation

Streaming XML parser and formatter

Awesome Lists containing this project

README

          

# muxml-cli [![Build Status Travis](https://travis-ci.org/t1st3/muxml-cli.svg?branch=master)](https://travis-ci.org/t1st3/muxml-cli) [![Coverage Status](https://codecov.io/gh/t1st3/muxml-cli/badge.svg?branch=master)](https://codecov.io/gh/t1st3/muxml-cli?branch=master)

> Streaming XML parser and formatter

Thin wrapper around [`muxml`](https://github.com/t1st3/muxml) to make it a [CLI](https://en.wikipedia.org/wiki/Command-line_interface) app.

Also available as a [gulp](https://github.com/t1st3/gulp-muxml) / [Grunt](https://github.com/t1st3/grunt-muxml) plugin.

## Install

```
$ npm install --save muxml-cli
```

## CLI

```console
$ muxml-cli --help

Usage
muxml-cli [input]

Options
--help
--strict use sax strict mode
--pretty prettify
--strip-comments strip XML comments
--strip-cdata strip CDATA tags
--strip-doctype strip XML DOCTYPE
--strip-instruction strip XML instruction
--strip-attributes strip attributes from tags
--filter tag name to filter
--input input file
--output output file

Examples
$ muxml-cli 'foo' --no-pretty > output.xml

$ muxml-cli --input=input.xml --no-pretty --output=output.xml

$ echo 'foo' | muxml-cli --no-pretty > output.xml
```

## Related

* [muxml](https://github.com/t1st3/muxml) | API for this module
* [gulp-muxml](https://github.com/t1st3/gulp-muxml) | this module as a [`gulp`](http://gulpjs.com/) plugin
* [grunt-muxml](https://github.com/t1st3/grunt-muxml) | this module as a [`Grunt`](http://gruntjs.com/) plugin

## License

MIT © [t1st3](https://t1st3.com)