fast-xml-parser
Advanced tools
Comparing version 1.1.0 to 1.1.1
@@ -31,3 +31,3 @@ var getAllMatches = function(string, regex) { | ||
exports.parse = function (xmlData){ | ||
var xml2json = function (xmlData){ | ||
xmlData = xmlData.replace(/>(\s+)/g, "");//Remove spaces and make it single line. | ||
@@ -102,5 +102,6 @@ var tags = getAllMatches(xmlData,tagsRegx); | ||
exports.parse = xml2json; | ||
// (function debug(){ | ||
// var xmlData = "<rootNode><tag>value</tag><intTag>45</intTag><floatTag>65.34</floatTag></rootNode>"; | ||
// var result = exports.parse(xmlData); | ||
// })(); | ||
// })(); |
{ | ||
"name": "fast-xml-parser", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"description": "Parse XML to JS/JSON very fast without C/C++ based libraries", | ||
@@ -5,0 +5,0 @@ "main": "./lib/parser.js", |
# [fast-xml-parser](https://www.npmjs.com/package/fast-xml-parser) | ||
Parse XML to JS/JSON very fast without C/C++ based libraries and no callback | ||
[![Code Climate](https://codeclimate.com/github/NaturalIntelligence/fast-xml-parser/badges/gpa.svg)](https://codeclimate.com/github/NaturalIntelligence/fast-xml-parser) [<img src="https://www.paypalobjects.com/webstatic/en_US/btn/btn_donate_92x26.png" alt="Stubmatic donate button"/>](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=KQJAX48SPUKNC) [![Known Vulnerabilities](https://snyk.io/test/github/naturalintelligence/fast-xml-parser/badge.svg)](https://snyk.io/test/github/naturalintelligence/fast-xml-parser) [![Travis ci Build Status](https://travis-ci.org/NaturalIntelligence/fast-xml-parser.svg?branch=master)](https://travis-ci.org/NaturalIntelligence/fast-xml-parser) [![Coverage Status](https://coveralls.io/repos/github/NaturalIntelligence/fast-xml-parser/badge.svg?branch=master)](https://coveralls.io/github/NaturalIntelligence/fast-xml-parser?branch=master) | ||
[![Code Climate](https://codeclimate.com/github/NaturalIntelligence/fast-xml-parser/badges/gpa.svg)](https://codeclimate.com/github/NaturalIntelligence/fast-xml-parser) [<img src="https://www.paypalobjects.com/webstatic/en_US/btn/btn_donate_92x26.png" alt="Stubmatic donate button"/>](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=KQJAX48SPUKNC) [![Known Vulnerabilities](https://snyk.io/test/github/naturalintelligence/fast-xml-parser/badge.svg)](https://snyk.io/test/github/naturalintelligence/fast-xml-parser) [![Travis ci Build Status](https://travis-ci.org/NaturalIntelligence/fast-xml-parser.svg?branch=master)](https://travis-ci.org/NaturalIntelligence/fast-xml-parser) [![Coverage Status](https://coveralls.io/repos/github/NaturalIntelligence/fast-xml-parser/badge.svg?branch=master)](https://coveralls.io/github/NaturalIntelligence/fast-xml-parser?branch=master) [<img src="https://img.shields.io/badge/Try-me-blue.svg?colorA=FFA500&colorB=0000FF" alt="Try me"/>](https://naturalintelligence.github.io/fast-xml-parser/) | ||
@@ -18,2 +18,9 @@ ### How to use | ||
To use it **on webpage** | ||
1. Download and include [parser.js](https://github.com/NaturalIntelligence/fast-xml-parser/blob/master/lib/parser.js) | ||
```js | ||
var jsonObj = xml2json(xmlData); | ||
``` | ||
**Give me a [star](https://github.com/NaturalIntelligence/fast-xml-parser)**, if you really like this project. | ||
@@ -20,0 +27,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
42653
9
209
58
0