function createXmldoc(){var t;return function(t){var n;if("undefined"!=typeof module&&module.exports&&!global.xmldocAssumeBrowser)n=require("sax");else if(!(n=this.sax))throw new Error("Expected sax to be defined. Make sure you're including sax.js before this file.");function e(t,e){var n;e||(n=l[l.length-1]).parser&&(e=n.parser),this.name=t.name,this.attr=t.attributes,this.val="",this.children=[],this.firstChild=null,this.lastChild=null,this.line=e?e.line:null,this.column=e?e.column:null,this.position=e?e.position:null,this.startTagPosition=e?e.startTagPosition:null}function i(t){this.text=t}function r(t){this.cdata=t}function o(t){this.comment=t}function h(t){if(!(t=t&&t.toString().trim()))throw new Error("No XML to parse!");var e;this.doctype="",this.parser=n.parser(!0),(e=this.parser).onopentag=c,e.onclosetag=d,e.ontext=u,e.oncdata=f,e.oncomment=m,e.ondoctype=y,e.onerror=g,l=[this];try{this.parser.write(t)}finally{delete this.parser}}e.prototype._addChild=function(t){this.children.push(t),this.firstChild||(this.firstChild=t),this.lastChild=t},e.prototype._opentag=function(t){t=new e(t);this._addChild(t),l.unshift(t)},e.prototype._closetag=function(){l.shift()},e.prototype._text=function(t){void 0!==this.children&&(this.val+=t,this._addChild(new i(t)))},e.prototype._cdata=function(t){this.val+=t,this._addChild(new r(t))},e.prototype._comment=function(t){void 0!==this.children&&this._addChild(new o(t))},e.prototype._error=function(t){throw t},e.prototype.eachChild=function(t,e){for(var n=0,i=this.children.length;n"+this.children[0].toString(e)+"";else if(this.children.length){i+=">"+r;for(var o=t+(e&&e.compressed?"":" "),h=0,s=this.children.length;h"}else!e||!e.html||-1!==["area","base","br","col","embed","frame","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"].indexOf(this.name)?i+="/>":i+=">";return i},i.prototype.toString=function(t){return _(v(this.text),t)},i.prototype.toStringWithIndent=function(t,e){return t+this.toString(e)},r.prototype.toString=function(t){return""},r.prototype.toStringWithIndent=function(t,e){return t+this.toString(e)},o.prototype.toString=function(t){return"\x3c!--"+_(v(this.comment),t)+"--\x3e"},o.prototype.toStringWithIndent=function(t,e){return t+this.toString(e)},e.prototype.type="element",i.prototype.type="text",r.prototype.type="cdata",o.prototype.type="comment";var s,a=h.prototype,p=e.prototype;for(s in p)p.hasOwnProperty(s)&&(a[s]=p[s]);h.prototype._opentag=function(t){void 0===this.children?e.call(this,t):e.prototype._opentag.apply(this,arguments)},h.prototype._doctype=function(t){this.doctype+=t};var l=null;function c(){l[0]&&l[0]._opentag.apply(l[0],arguments)}function d(){l[0]&&l[0]._closetag.apply(l[0],arguments)}function u(){l[0]&&l[0]._text.apply(l[0],arguments)}function f(){l[0]&&l[0]._cdata.apply(l[0],arguments)}function m(){l[0]&&l[0]._comment.apply(l[0],arguments)}function y(){l[0]&&l[0]._doctype.apply(l[0],arguments)}function g(){l[0]&&l[0]._error.apply(l[0],arguments)}function v(t){return t.toString().replace(/&/g,"&").replace(//g,">").replace(/'/g,"'").replace(/"/g,""")}function _(t,e){var n=t;return e&&e.trimmed&&25