X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/49906096d20853e8ce794225e7ce14147bf112ec..bf8e16e2a24ce9828193a3b4145dfdbc5b94a935:/src/wlxml/wlxml.js?ds=sidebyside diff --git a/src/wlxml/wlxml.js b/src/wlxml/wlxml.js index 4f6e356..034312d 100644 --- a/src/wlxml/wlxml.js +++ b/src/wlxml/wlxml.js @@ -343,14 +343,17 @@ var wlxmlClasses = { return { - WLXMLDocumentFromXML: function(xml, options) { + WLXMLDocumentFromXML: function(xml, options, Factory) { options = _.extend({wlxmlClasses: wlxmlClasses}, options); - return new WLXMLDocument(xml, options); + Factory = Factory || WLXMLDocument; + return new Factory(xml, options); }, WLXMLElementNodeFromXML: function(xml) { return this.WLXMLDocumentFromXML(xml).root; - } + }, + + WLXMLDocument: WLXMLDocument }; }); \ No newline at end of file