Works in browsers and NodeJS. Includes (namespaced) elements, (namespaced) attributes, processing instructions, comments and CDATA.
The only argument is a string of well-formed XML.
import parser from 'slimdom-sax-parser';
const document = parser.sync('<example></example>');
- The streaming version