I'm looking for a parser which can run in a javascript environment where there is no access to document
, DOMParser
or any other browser extension. The javascript application can run in browsers (IE, Firefox, Chrome, Safari...) in node.js but it is destined to run mainly embedded in a V8 or in a SpiderMonkey environment. The environment is distributed without support for the usual XML parsers and I am unable to parse a string containing valid XML from javascript.
All libraries which rely on browser extensions like DOMParser
and ActiveXObject
fail with messages like ReferenceError: DOMParser is not defined
.
Access to file system is not necessary (I need to parse from string to a DOM-like structure).