/* Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license*/(function(){CKEDITOR.plugins.add("xml",{});CKEDITOR.xml=function(c){vara=null;if("object"==typeofc)a=c;elseif(c=(c||"").replace(/ /g," "),"ActiveXObject"inwindow){try{a=newActiveXObject("MSXML2.DOMDocument")}catch(b){try{a=newActiveXObject("Microsoft.XmlDom")}catch(d){}}a&&(a.async=!1,a.resolveExternals=!1,a.validateOnParse=!1,a.loadXML(c))}elsewindow.DOMParser&&(a=(newDOMParser).parseFromString(c,"text/xml"));this.baseXml=a};CKEDITOR.xml.prototype={selectSingleNode:function(c,a){varb=this.baseXml;if(a||(a=b)){if("selectSingleNode"ina)returna.selectSingleNode(c);if(b.evaluate)return(b=b.evaluate(c,a,null,9,null))&&b.singleNodeValue||null}returnnull},selectNodes:function(c,a){varb=this.baseXml,d=[];if(a||(a=b)){if("selectNodes"ina)returna.selectNodes(c);if(b.evaluate&&(b=b.evaluate(c,a,null,5,null)))for(vare;e=b.iterateNext();)d.push(e)}returnd},getInnerXml:function(c,a){varb=this.selectSingleNode(c,a),d=[];if(b)for(b=b.firstChild;b;)b.xml?d.push(b.xml):window.XMLSerializer&&d.push((newXMLSerializer).serializeToString(b)),b=b.nextSibling;returnd.length?d.join(""):null}}})();