fast-xml-parser
Advanced tools
Comparing version 3.0.0 to 3.0.1
@@ -0,1 +1,29 @@ | ||
3.0.1 / 2018-02-09 | ||
* fix CRLF: replace it with single space in attributes value only. | ||
3.0.0 / 2018-02-08 | ||
* change online tool with new changes | ||
* update info about new options | ||
* separate tag value processing to separate function | ||
* make HTML decoding optional | ||
* give an option to allow boolean attributes | ||
* change cli options as per v3 | ||
* Correct comparison table format on README | ||
* update v3 information | ||
* some performance improvement changes | ||
* Make regex object local to the method and move some common methods to util | ||
* Change parser to | ||
- handle multiple instances of CDATA | ||
- make triming of value optionals | ||
- HTML decode attribute and text value | ||
- refactor code to separate files | ||
* Ignore newline chars without RE (in validator) | ||
* validate for XML prolog | ||
* Validate DOCTYPE without RE | ||
* Update validator to return error response | ||
* Update README to add detail about V3 | ||
* Separate xmlNode model class | ||
* include vscode debug config | ||
* fix for repeated object | ||
* fix attribute regex for boolean attributes | ||
* Fix validator for invalid attributes | ||
2.9.4 / 2018-02-02 | ||
@@ -113,2 +141,2 @@ * Merge pull request: Decode HTML characters | ||
2.2.1 / 2017-02-05 | ||
* Bug fix: CLI default option | ||
* Bug fix: CLI default option |
{ | ||
"name": "fast-xml-parser", | ||
"version": "3.0.0", | ||
"version": "3.0.1", | ||
"description": "Validate XML or Parse XML to JS/JSON very fast without C/C++ based libraries", | ||
@@ -5,0 +5,0 @@ "main": "./src/parser.js", |
@@ -51,4 +51,4 @@ var util = require("./util"); | ||
options = buildOptions(options); | ||
xmlData = xmlData.replace(/\r?\n/g, " ");//make it single line | ||
xmlData = xmlData.replace(/<!--.*?-->/g, "");//Remove comments | ||
//xmlData = xmlData.replace(/\r?\n/g, " ");//make it single line | ||
xmlData = xmlData.replace(/<!--[\s\S]*?-->/g, "");//Remove comments | ||
@@ -58,3 +58,3 @@ var xmlObj = new xmlNode('!xml'); | ||
var tagsRegx = new RegExp("<((!\\[CDATA\\[(.*?)(\\]\\]>))|((\\w*:)?([\\w:\\-\\._]+))([^>]*)>|((\\/)((\\w*:)?([\\w:\\-\\._]+))>))([^<]*)","g"); | ||
var tagsRegx = new RegExp("<((!\\[CDATA\\[([\\s\\S]*?)(\\]\\]>))|((\\w*:)?([\\w:\\-\\._]+))([^>]*)>|((\\/)((\\w*:)?([\\w:\\-\\._]+))>))([^<]*)","g"); | ||
var tag = tagsRegx.exec(xmlData); | ||
@@ -172,2 +172,3 @@ var nextTag = tagsRegx.exec(xmlData); | ||
if( !options.ignoreAttributes && typeof attrStr === "string" ){ | ||
attrStr = attrStr.replace(/\r?\n/g, " "); | ||
//attrStr = attrStr || attrStr.trim(); | ||
@@ -174,0 +175,0 @@ |
@@ -216,3 +216,3 @@ var util = require("./util"); | ||
*/ | ||
var validAttrStrRegxp = new RegExp("(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['\"])((.|\\n)*?)\\5)?", "g"); | ||
var validAttrStrRegxp = new RegExp("(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['\"])(([\\s\\S])*?)\\5)?", "g"); | ||
@@ -219,0 +219,0 @@ //attr, ="sd", a="amit's", a="sd"b="saf", ab cd="" |
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
201758
638