[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: contemporary XML parsing in JavaScript
On Thu, 2022-12-01 at 16:25 -0500, Simon St.Laurent wrote: > > "fast-XML-parser NPM package has more downloads/week (6 million) than > Vue (3.4 million) or Angular (3 million)." Good fined! It might also suggest they do a lot of bug fixes, since node checks often for new revisions. Or that there was a mistake that caused the package to be downloaded every time node.js was started. Or that it's fairly widely used :) Checking https://snyk.io/advisor/npm-package/fast-xml-parser i see that 658 other projects depend on it. Also, i do notice a spike of downloads after each release, but it's small compared to the total, so that's not a major factor. React.js gets nearly 17 million downloads per week, though, accordingto that page, and xml-js gets over 14. It's not a validating parser; the documentation says "DOCTYPE entities are supported" and also "unpaired tags (Eg <br> in HTML), stop nodes (Eg <script> in HTML) are supported" See https://github.com/NaturalIntelligence/fast-xml-parser The "validator" has an option, "allowBooleanAttributes" but doesn't seem to have any reference to a DTD or external document type definition: it's checking well-formedness: const xmlData = `<parent><extra></parent>`; const result = XMLValidator.validate( xmlData, { unpairedTags: ["extra"] }); Being able to "validate" this as XML is a violation of the XML specification, but that doesn't mean it isn't useful. The parser does not allow entity replacement text to contain &, and also goes wrong (silently returns an incorrect result as XML) if there is an unescaped & in the input. So, it's moderately popular, widely used, a little buggy... interestingly, it has some HTML entities built in such as &inr; for Indian Rupee but not egrave etc. It looks like they are actively working to improve it, and are aware of, and admit to, its limitations, which is excellent. liam -- Liam Quin, https://www.delightfulcomputing.com/ Available for XML/Document/Information Architecture/XSLT/ XSL/XQuery/Web/Text Processing/A11Y training, work & consulting. Barefoot Web-slave, antique illustrations: http://www.fromoldbooks.org
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] |
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|