//>>built
define("dojox/xml/DomParser",["dojo/_base/kernel","dojo/_base/array"],function(n){n.getObject("xml",!0,dojox);dojox.xml.DomParser=new function(){function E(){return new function(){var b={};this.nodeType=l.DOCUMENT;this.nodeName="#document";this.namespaces={};this._nsPaths={};this.childNodes=[];this.documentElement=null;this._add=function(a){"undefined"!=typeof a.id&&(b[a.id]=a)};this._remove=function(a){b[a]&&delete b[a]};this.byId=this.getElementById=function(a){return b[a]};this.byName=this.getElementsByTagName=
t;this.byNameNS=this.getElementsByTagNameNS=u;this.childrenByName=v;this.childrenByNameNS=w}}function t(b){function a(e,c,h){n.forEach(e.childNodes,function(g){g.nodeType==l.ELEMENT&&("*"==c?h.push(g):g.nodeName==c&&h.push(g),a(g,c,h))})}var d=[];a(this,b,d);return d}function u(b,a){function d(c,h,g,k){n.forEach(c.childNodes,function(f){f.nodeType==l.ELEMENT&&("*"==h&&f.ownerDocument._nsPaths[g]==f.namespace?k.push(f):f.localName==h&&f.ownerDocument._nsPaths[g]==f.namespace&&k.push(f),d(f,h,g,k))})}
a||(a="_def_");var e=[];d(this,b,a,e);return e}function v(b){var a=[];n.forEach(this.childNodes,function(d){d.nodeType==l.ELEMENT&&("*"==b?a.push(d):d.nodeName==b&&a.push(d))});return a}function w(b,a){var d=[];n.forEach(this.childNodes,function(e){e.nodeType==l.ELEMENT&&("*"==b&&e.ownerDocument._nsPaths[a]==e.namespace?d.push(e):e.localName==b&&e.ownerDocument._nsPaths[a]==e.namespace&&d.push(e))});return d}function x(b){return{nodeType:l.TEXT,nodeName:"#text",nodeValue:b.replace(y," ").replace(z,
"\x3e").replace(A,"\x3c").replace(B,"'").replace(C,'"').replace(D,"\x26")}}function F(b){for(var a=0;a<this.attributes.length;a++)if(this.attributes[a].nodeName==b)return this.attributes[a].nodeValue;return null}function G(b,a){for(var d=0;d<this.attributes.length;d++)if(this.ownerDocument._nsPaths[a]==this.attributes[d].namespace&&this.attributes[d].localName==b)return this.attributes[d].nodeValue;return null}function H(b,a){for(var d=null,e=0;e<this.attributes.length;e++)if(this.attributes[e].nodeName==
b){d=this.attributes[e].nodeValue;this.attributes[e].nodeValue=a;break}"id"==b&&(null!=d&&this.ownerDocument._remove(d),this.ownerDocument._add(this))}function I(b,a,d){for(var e=0;e<this.attributes.length;e++)if(this.ownerDocument._nsPaths[d]==this.attributes[e].namespace&&this.attributes[e].localName==b){this.attributes[e].nodeValue=a;break}}function J(){var b=this.parentNode;if(b)for(var a=0;a<b.childNodes.length;a++)if(b.childNodes[a]==this&&0<a)return b.childNodes[a-1];return null}function K(){var b=
this.parentNode;if(b)for(var a=0;a<b.childNodes.length;a++)if(b.childNodes[a]==this&&a+1<b.childNodes.length)return b.childNodes[a+1];return null}var l={ELEMENT:1,ATTRIBUTE:2,TEXT:3,CDATA_SECTION:4,PROCESSING_INSTRUCTION:7,COMMENT:8,DOCUMENT:9},L=/<([^>\/\s+]*)([^>]*)>([^<]*)/g,M=/([^=]*)=(("([^"]*)")|('([^']*)'))/g,q=/<!ENTITY\s+([^"]*)\s+"([^"]*)">/g,N=/<!\[CDATA\[([\u0001-\uFFFF]*?)\]\]>/g,O=/\x3c!--([\u0001-\uFFFF]*?)--\x3e/g,p=/^\s+|\s+$/g,y=/\s+/g,z=/&gt;/g,A=/&lt;/g,C=/&quot;/g,B=/&apos;/g,
D=/&amp;/g;this.parse=function(b){var a=E();if(null==b||0==b.length)return a;if(0<b.indexOf("\x3c!ENTITY")){var d,e=[];if(q.test(b)){for(q.lastIndex=0;null!=(d=q.exec(b));)e.push({entity:"\x26"+d[1].replace(p,"")+";",expression:d[2]});for(var c=0;c<e.length;c++)b=b.replace(new RegExp(e[c].entity,"g"),e[c].expression)}}for(e=[];null!=(d=N.exec(b));)e.push(d[1]);for(c=0;c<e.length;c++)b=b.replace(e[c],c);for(d=[];null!=(c=O.exec(b));)d.push(c[1]);for(c=0;c<d.length;c++)b=b.replace(d[c],c);var h;for(c=
a;null!=(h=L.exec(b));)if("/"==h[2].charAt(0)&&1<h[2].replace(p,"").length){c.parentNode&&(c=c.parentNode);var g=(h[3]||"").replace(p,"");0<g.length&&c.childNodes.push(x(g))}else if(0<h[1].length)if("?"==h[1].charAt(0))g=h[1].substr(1),h=h[2].substr(0,h[2].length-2),c.childNodes.push({nodeType:l.PROCESSING_INSTRUCTION,nodeName:g,nodeValue:h});else if("!"==h[1].charAt(0))if(0==h[1].indexOf("![CDATA[")){var k=parseInt(h[1].replace("![CDATA[","").replace("]]",""));c.childNodes.push({nodeType:l.CDATA_SECTION,
nodeName:"#cdata-section",nodeValue:e[k]})}else"!--"==h[1].substr(0,3)&&(k=parseInt(h[1].replace("!--","").replace("--","")),c.childNodes.push({nodeType:l.COMMENT,nodeName:"#comment",nodeValue:d[k]}));else{g=h[1].replace(p,"");var f={nodeType:l.ELEMENT,nodeName:g,localName:g,namespace:"_def_",ownerDocument:a,attributes:[],parentNode:null,childNodes:[]};if(-1<g.indexOf(":")){var m=g.split(":");f.namespace=m[0];f.localName=m[1]}f.byName=f.getElementsByTagName=t;f.byNameNS=f.getElementsByTagNameNS=u;
f.childrenByName=v;f.childrenByNameNS=w;f.getAttribute=F;f.getAttributeNS=G;f.setAttribute=H;f.setAttributeNS=I;f.previous=f.previousSibling=J;for(f.next=f.nextSibling=K;null!=(k=M.exec(h[2]));)if(0<k.length)if(g=k[1].replace(p,""),k=(k[4]||k[6]||"").replace(y," ").replace(z,"\x3e").replace(A,"\x3c").replace(B,"'").replace(C,'"').replace(D,"\x26"),0==g.indexOf("xmlns"))0<g.indexOf(":")?(m=g.split(":"),a.namespaces[m[1]]=k,a._nsPaths[k]=m[1]):(a.namespaces._def_=k,a._nsPaths[k]="_def_");else{var r=
g;m="_def_";0<g.indexOf(":")&&(m=g.split(":"),r=m[1],m=m[0]);f.attributes.push({nodeType:l.ATTRIBUTE,nodeName:g,localName:r,namespace:m,nodeValue:k});"id"==r&&(f.id=k)}a._add(f);c&&(c.childNodes.push(f),f.parentNode=c,"/"!=h[2].charAt(h[2].length-1)&&(c=f));g=h[3];0<g.length&&c.childNodes.push(x(g))}for(c=0;c<a.childNodes.length;c++)if(b=a.childNodes[c],b.nodeType==l.ELEMENT){a.documentElement=b;break}return a}};return dojox.xml.DomParser});