muxml is a Node.js streaming XML parser and formatter built on sax. It accepts XML strings via a Transform stream and emits individual XML elements as chunks. It supports minification, beautification, and stripping of comments, CDATA, instructions, doctype declarations, and attributes, plus tag filtering. The package is available in ES6 and ES5/UMD formats for Node.js >=4 and browser. Current stable version 2.0.1 requires Node.js >=8. It is maintained, but the last release was in 2019.
npm install muxmlNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Reads an XML file, streams it through muxml with pretty disabled, and logs each element chunk as a string.
Do not set saxOptions.trim to false; it will be ignored.
Upgrade Node.js to >=8 or use an older version of muxml (1.0.1 supports Node >=4).
Use muxml@1.0.1 if targeting Node <4.
Use <script> tag and call window.muxml(options).
Run 'npm install muxml' and ensure require('muxml') is used; avoid subpath imports.Use 'const muxml = require("muxml")' (CJS) or 'import muxml from "muxml"' (ESM with bundler).Use CommonJS require() or set type:module in package.json and use a suitable Node version.