X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/49906096d20853e8ce794225e7ce14147bf112ec..9608fd1f0786c3baf2c2acb3149acba2c9008314:/src/wlxml/wlxml.js 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