
Security News
ECMAScript 2025 Finalized with Iterator Helpers, Set Methods, RegExp.escape, and More
ECMAScript 2025 introduces Iterator Helpers, Set methods, JSON modules, and more in its latest spec update approved by Ecma in June 2025.
isomorphic-xml2js
Advanced tools
npm install --save isomorphic-xml2js
A drop-in replacement for xml2js that uses the built in DOMParser/XMLSerializer when bundled for the browser, drastically reducing the bundle size (~129k for node-xml2js, currently ~6k for isomorphic-xml2js). Simply exports xml2js when used in a node.js environment.
The goal is to support as much of the xml2js API as reasonably possible. Some features may be dropped if they are found to be unreasonably difficult to implement or if they excessively increase the bundle size or reduce performance.
Note that the JavaScript in this library is targeting ES2017. If you want to target an earlier ES version when bundling, make sure you use something like babel in your bundler.
strict: false
has no effect. Parsing malformed XML documents is unsupported.async: true
has no effect. Parsing is always synchronous, even though the API is callback-based to match node-xml2js.options.renderOpts
is ignored and XML documents are not pretty printed.
<xslt:output indent="yes" />
attribute is not supported in Firefox, Edge or IE and so doesn't seem portable enough to be worth it. Non-built-in methods of pretty printing XML may be too much of an increase in bundle size for a feature that's usually only useful at development time.validator
is not implemented.includeWhiteChars: false
is specified, even though such CDATA is preserved in node-xml2js.new
may give a runtime error depending on the ES target level in your bundler config.addListener
and on
methods on xml2js.Parser
are not supported.0.1.1 - 2018-05-21
FAQs
XML parsing for browser and node.js
The npm package isomorphic-xml2js receives a total of 2,214 weekly downloads. As such, isomorphic-xml2js popularity was classified as popular.
We found that isomorphic-xml2js demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
ECMAScript 2025 introduces Iterator Helpers, Set methods, JSON modules, and more in its latest spec update approved by Ecma in June 2025.
Security News
A new Node.js homepage button linking to paid support for EOL versions has sparked a heated discussion among contributors and the wider community.
Research
North Korean threat actors linked to the Contagious Interview campaign return with 35 new malicious npm packages using a stealthy multi-stage malware loader.