You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Validate XML, Parse XML to JS/JSON and vise versa, or parse XML to Nimn rapidly without C/C++ based libraries and no callback
2
+
Validate XML, Parse XML to JS/JSON and vice versa, or parse XML to Nimn rapidly without C/C++ based libraries and no callback
3
3
4
4
5
5
[](#backers)[](#sponsors)[](https://snyk.io/test/github/naturalintelligence/fast-xml-parser)
@@ -32,7 +32,7 @@ Validate XML, Parse XML to JS/JSON and vise versa, or parse XML to Nimn rapidly
32
32
* Various options are available to customize the transformation
33
33
* You can parse CDATA as separate property.
34
34
* You can prefix attributes or group them to separate property. Or can ignore them from result completely.
35
-
* You can parse tag's or attribute's value to premitive type: string, integer, float, or boolean. And can optionally decode for HTML char.
35
+
* You can parse tag's or attribute's value to primitive type: string, integer, float, or boolean. And can optionally decode for HTML char.
36
36
* You can remove namespace from tag or attribute name while parsing
37
37
* It supports boolean attributes, if configured.
38
38
@@ -48,7 +48,7 @@ To use it from **CLI** Install it globally with `-g` option.
48
48
49
49
`$npm install fast-xml-parser -g`
50
50
51
-
To use it on a**webpage**Include it from [parser.js](https://github.com/NaturalIntelligence/fast-xml-parser/blob/master/lib/parser.js)Or directly from [CDN](https://cdnjs.com/libraries/fast-xml-parser)
51
+
To use it on a**webpage**include it from [parser.js](https://github.com/NaturalIntelligence/fast-xml-parser/blob/master/lib/parser.js)or directly from [CDN](https://cdnjs.com/libraries/fast-xml-parser)
52
52
53
53
### XML to JSON or XML to Nimn
54
54
```js
@@ -99,7 +99,7 @@ var nimndata = fastXmlParser.convertTonimn(tObj,schema,options);
99
99
***trimValues** : trim string values of an attribute or node
100
100
***decodeHTMLchar** : This options has been removed from 3.3.4. Instead, use tagValueProcessor, and attrValueProcessor. See above example.
101
101
***cdataTagName** : If specified, parser parse CDATA as nested tag instead of adding it's value to parent tag.
102
-
***cdataPositionChar** : It'll help to covert JSON back to XML without loosing CDATA position.
102
+
***cdataPositionChar** : It'll help to covert JSON back to XML without losing CDATA position.
103
103
***tagValueProcessor** : Process tag value during transformation. Like HTML decoding, word capitalization, etc. Applicable in case of string only.
104
104
***attrValueProcessor** : Process attribute value during transformation. Like HTML decoding, word capitalization, etc. Applicable in case of string only.
* -ns : To include namespaces (by default ignored)
113
113
* -a : To ignore attributes
114
114
* -c : To ignore value conversion (i.e. "-3" will not be converted to number -3)
115
115
* -v : validate before parsing
@@ -162,10 +162,10 @@ With the correct options, you can get the almost original XML without losing any
162
162
***attrValueProcessor** : Process attribute value during transformation. Like HTML encoding, word capitalization, etc. Applicable in case of string only.
163
163
164
164
## Comparision
165
-
We've copared various libraries which transforms XML to JS. Most of them either are dependent on C/C++ libraries, or slow, or don't do reverse transformation.
165
+
We've compared various libraries which transforms XML to JS. Most of them either are dependent on C/C++ libraries, or slow, or don't do reverse transformation.
166
166
167
167
*Why not C/C++ based libraries?*
168
-
C/C++ based liraries are no doubt faster than this library but they don't run in browser, and a user need to install extra supporting libraries on their computer.
168
+
C/C++ based libraries are no doubt faster than this library but they don't run in browser, and a user need to install extra supporting libraries on their computer.
0 commit comments