xml-twig 1.9.3 → 1.9.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -8
- package/doc/twig.md +1 -1
- package/package.json +1 -1
- package/twig.js +1 -1
package/README.md
CHANGED
|
@@ -20,7 +20,7 @@ When you need to read an XML file, there are two primary approaches:
|
|
|
20
20
|
This module aims to combine both approaches. It reads the XML document in chunks, and within each chunk, you can utilize the familiar features and functions of a DOM-based parser.
|
|
21
21
|
|
|
22
22
|
## Dependencies
|
|
23
|
-
XML documents are parsed using either the [sax](https://www.npmjs.com/package/sax) or [node-expat](https://www.npmjs.com/package/node-expat) parser. parsers. Additional parsers may be added in future releases. By default, the `sax` parser is used. However, I
|
|
23
|
+
XML documents are parsed using either the [sax](https://www.npmjs.com/package/sax) or [node-expat](https://www.npmjs.com/package/node-expat) parser. parsers. Additional parsers may be added in future releases. By default, the `sax` parser is used. However, I recommend using the `node-expat` parser, which is faster more compliant with XML standards.
|
|
24
24
|
|
|
25
25
|
**NOTE: The `node-expat` module is not automatically installed with this module. If you wish to use it, you must install it manually.**
|
|
26
26
|
|
|
@@ -386,12 +386,5 @@ This `xml-twig` module focus on reading a XML files. In principle it would be po
|
|
|
386
386
|
|
|
387
387
|
Accessing Twig-Elements by [XML-Path](https://www.w3.org/TR/xpath/) language is not supported. One reason it, the `Twig` class models more an [Element](https://www.w3schools.com/xml/xml_elements.asp) rather than a [Node](https://www.w3schools.com/xml/dom_nodes.asp) which would be more generic.
|
|
388
388
|
|
|
389
|
-
As already mentioned above, I recommend the `expat` parser. The other parser may work for your purpose, however they have several limitations and bugs:
|
|
390
|
-
|
|
391
|
-
- `sax` does not support UTF-16 encoding. I did not test other encodings, because [W3C Recommendations](https://www.w3.org/TR/xml/#charencoding) defines only UTF-8 and UTF-16 as required
|
|
392
|
-
- `sax` misinterpret character entities
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
389
|
|
|
397
390
|
|
package/doc/twig.md
CHANGED
|
@@ -1528,7 +1528,7 @@ Generic error for unsupported condition
|
|
|
1528
1528
|
|
|
1529
1529
|
## SAX
|
|
1530
1530
|
**Kind**: global constant
|
|
1531
|
-
**Version:**: 1.9.
|
|
1531
|
+
**Version:**: 1.9.4
|
|
1532
1532
|
**Author:**: Wernfried Domscheit
|
|
1533
1533
|
**Copyright:**: Copyright (c) 2025 Wernfried Domscheit. All rights reserved.
|
|
1534
1534
|
**Website:**: https://www.npmjs.com/package/xml-twig
|
package/package.json
CHANGED
package/twig.js
CHANGED