A JavaScript implementation of W3C DOM for Node.js, Rhino and the browser. Fully
compatible with W3C DOM level2; and some compatible with level3. Supports
DOMParser and XMLSerializer interface such as in browser.
//added the options argumentnew DOMParser(options)//errorHandler is supportednew DOMParser({ /** * locator is always need for error position info */ locator:{}, /** * you can override the errorHandler for xml parser * @link http://www.saxproject.org/apidoc/org/xml/sax/ErrorHandler.html */ errorHandler:{