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
@@ -121,11 +146,10 @@ Your contribution in terms of donation, testing, bug fixes, code development etc
121
146
122
147
**Give a [star](https://github.com/NaturalIntelligence/fast-xml-parser)**, if you really like this project.
123
148
124
-
# Changes from v3 (in progress)
149
+
# Changes from v3
125
150
126
-
* Can handle big files as well.
127
-
* Validator is clubbed with parser
128
-
* Meaningful error messages
151
+
* It can handle big file now. Performance report is given above.
152
+
* Meaningful error messages from validator
129
153
130
154
```
131
155
"err": {
@@ -138,28 +162,26 @@ Your contribution in terms of donation, testing, bug fixes, code development etc
138
162
139
163
```
140
164
var defaultOptions = {
141
-
attrNamePrefix : "@_", //prefix for attributes
142
-
attrNodeName: false, //Group attributes in separate node
165
+
attributeNamePrefix : "@_", //prefix for attributes
166
+
attrNodeName: false, //Group attributes in separate node
143
167
textNodeName : "#text", //Name for property which will have value of the node in case nested nodes are present, or attributes
144
-
ignoreAttributes : true, //ignore attributes
145
-
allowBooleanAttributes : false, //A tag can have attributes without any value
146
-
ignoreNameSpace : false, //ignore namespace from the name of a tag and attribute. It also removes xmlns attribute
147
-
parseNodeValue : true, //convert the value of node to primitive type. E.g. "2" -> 2
148
-
parseAttributeValue : false, //convert the value of attribute to primitive type. E.g. "2" -> 2
149
-
trimValues: true, //Trim string values of tag and attributes
168
+
ignoreAttributes : true, //ignore attributes
169
+
ignoreNameSpace : false, //ignore namespace from the name of a tag and attribute. It also removes xmlns attribute
170
+
parseNodeValue : true, //convert the value of node to primitive type. E.g. "2" -> 2
171
+
parseAttributeValue : false, //convert the value of attribute to primitive type. E.g. "2" -> 2
172
+
trimValues: true, //Trim string values of tag and attributes
150
173
};
151
174
```
152
175
* Parse boolean values as well. E.g. `"true"` to `true`
153
176
* You can set pasrer not to *trim* whitespaces from attribute or tag /node value.
154
177
* Tag / node and attribute value is by default HTML decoded. However CDATA value will not be decoded.
155
178
* Tag / node value will not be parsed if CDATA presents.
156
-
* Few validation bugs are also fixed
179
+
* Few validation and parsing bugs are also fixed
157
180
158
181
159
182
Some of my other NPM pojects
160
183
-[stubmatic](https://github.com/NaturalIntelligence/Stubmatic) : A stub server to mock behaviour of HTTP(s) / REST / SOAP services. Stubbing redis is on the way.
161
-
-[compare js](https://github.com/NaturalIntelligence/comparejs) : compare the features of JS code, libraries, and NPM repos.
162
-
-[fast-lorem-ipsum](https://github.com/amitguptagwl/fast-lorem-ipsum) : Generate lorem ipsum words, sentences, paragraph very quickly.
184
+
-[fast-lorem-ipsum](https://github.com/amitguptagwl/fast-lorem-ipsum) : Generate lorem ipsum words, sentences, paragraph very quickly.
0 commit comments