Parser | Size | Maintained | Node.js | Browser | Streaming | Types | Modifying XML | Notes |
---|---|---|---|---|---|---|---|---|
jsdom | 3.11 MB | yes | yes | N/A | DefinitelyTyped | yes | Probably the best choice since its API is closest to the browser API for manipulating XML | |
cheerio | 558 kB | yes | yes | yes | included | yes | jQuery-like API for parsing and manipulating HTML and XML | |
xmldoc | 41.4 kB | yes | yes | yes | DefinitelyTyped | Partial, not recommended (nfarina/xmldoc#51) | ||
@xmldom/xmldom | 182 kB | yes | yes | yes | included | yes | ||
sax | 55 kB | yes | yes | yes? | yes | DefinitelyTyped | Not recommended | |
xml2js | yes | yes | yes | no | DefinitelyTyped | |||
@xml-tools/parser | 39 kB | yes | included | Automatic error recovery | ||||
fast-xml-parser | 107 kB | yes | yes | yes | no | included | tag['@_attribute]'] ), some people have moved away from it (1, 2) |
|
@rgrove/parse-xml | 380 kB | yes | yes | yes | included | |||
xml-stream | ⚠??? | yes | yes |
Last active
January 12, 2024 20:04
-
-
Save bmaupin/eeab2b4dffab18f12a1b5f279e0dcb75 to your computer and use it in GitHub Desktop.
JavaScript XML parsers
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment