@jackens/format-xml
v1.6.14
Published
‘format-xml’ simply formats xml. Works in both Node.js and the browser. Lightweight. No dependencies.
Downloads
12
Readme
format-xml
‘format-xml’ simply formats xml. Works in both Node.js and the browser. Lightweight. No dependencies.
Install
NPM
npm install @jackens/format-xmlCDN
<script type="text/javascript" src="https://cdn.rawgit.com/jackens/format-xml/master/format-xml.js"></script>or
<script type="text/javascript" src="https://cdn.rawgit.com/jackens/format-xml/master/format-xml.min.js"></script>or
<script type="text/javascript" src="https://unpkg.com/@jackens/format-xml/format-xml.js"></script>or
<script type="text/javascript" src="https://unpkg.com/@jackens/format-xml/format-xml.min.js"></script>Usage
var formatXml = require('@jackens/format-xml')
formatXml(someXmlString, options)Defaults:
{
indent: ' ',
caseInsensitiveTags: false,
caseInsensitiveAttributes: false
}More usage examples: https://github.com/jackens/format-xml/blob/master/test.js.
