Skip to content

Ahmadreza-s/xmlparser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@ebcom/xml-parser

Fast and Simple XML Parser for parsing xml to json objects.

Installation

npm i @ebcom/xmlparser

How to use

const ebcomXmlParser = require('@ebcom/xmlparser');

//create an instance of parser with some options (if u want to use it globally in your project)
const parser = ebcomXmlParser({returnAttributeAsArray: true, throwErrorIfXmlNotValid: true});

const xml = `<note>
<to>Tove</to>
<from>Jani</from>
<heading>Reminder</heading>
<body>Don't forget me this weekend!</body>
</note>`

const jsonObject = parser.parse(xml); //return a json object, simple as that :) 

About

Fast and Simple XML Parser for parsing xml to json objects.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published