https://github.com/mrbenhowl/flattenxml
Flattens formatted XML
https://github.com/mrbenhowl/flattenxml
flatten flattener javascript nodejs npm xml
Last synced: 3 months ago
JSON representation
Flattens formatted XML
- Host: GitHub
- URL: https://github.com/mrbenhowl/flattenxml
- Owner: mrbenhowl
- License: mit
- Created: 2018-05-16T23:56:29.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2018-05-25T04:04:39.000Z (about 7 years ago)
- Last Synced: 2025-03-18T10:13:14.097Z (3 months ago)
- Topics: flatten, flattener, javascript, nodejs, npm, xml
- Language: JavaScript
- Size: 3.91 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# FlattenXML
Small JavaScript/NodeJS library that takes a formatted XML string like the following:```xml
hedgehogs are awesome
```
and makes it as flat as a pancake like so:
```xml
hedgehogs are awesome
```## Installation
Using npm / yarn:
```shell
npm i flattenxmlyarn add flattenxml
```## Usage
```js
const flattenXml = require('flattenxml')const formattedXml = `
hedgehogs are awesome
`
console.log(flattenXml(formattedXml))
```## Credits
Made possible because of the fantastic [xmldoc](https://github.com/nfarina/xmldoc)