UNPKG

raptor

Version:

RaptorJS provides an AMD module loader that works in Node, Rhino and the web browser. It also includes various sub-modules to support building optimized web applications.

28 lines (23 loc) 602 B
/** * @extension jQuery */ define.Class( 'raptor/xml/dom/DomParser', function(require) { "use strict"; var DomParser = function(options) { }; DomParser.prototype = { parse: function(xmlSrc) { try { var xmlDoc = $.parseXML(xmlSrc); return xmlDoc; } catch(e) { throw new Error("Invalid XML"); } } }; return DomParser; });