public/ckeditor/_source/plugins/xml/plugin.js
function( xpath, contextNode )
		{
			var baseXml = this.baseXml,
				nodes = [];

			if ( contextNode || ( contextNode = baseXml ) )
			{
				if ( CKEDITOR.env.ie || contextNode.selectNodes )		// IE
					return contextNode.selectNodes( xpath );
				else if ( baseXml.evaluate )							// Others
				{
					var result = baseXml.evaluate( xpath, contextNode, null, 5, null);

					if ( result )
					{
						var node;
						while ( ( node = result.iterateNext() ) )
							nodes.push( node );
					}
				}
			}

			return nodes;
		}
function( xpath, contextNode )
		{
			var baseXml = this.baseXml,
				nodes = [];

			if ( contextNode || ( contextNode = baseXml ) )
			{
				if ( CKEDITOR.env.ie || contextNode.selectNodes )		// IE
					return contextNode.selectNodes( xpath );
				else if ( baseXml.evaluate )							// Others
				{
					var result = baseXml.evaluate( xpath, contextNode, null, 5, null);

					if ( result )
					{
						var node;
						while ( ( node = result.iterateNext() ) )
							nodes.push( node );
					}
				}
			}

			return nodes;
		}
function ( xpath , contextNode ) { var baseXml = this . baseXml , nodes = [ ] ; if ( contextNode || ( contextNode = baseXml ) ) { if ( CKEDITOR . env . ie || contextNode . selectNodes ) // IE
 return contextNode . selectNodes ( xpath ) ; else if ( baseXml . evaluate ) // Others
 { var result = baseXml . evaluate ( xpath , contextNode , null , 5 , null ) ; if ( result ) { var node ; while ( ( node = result . iterateNext ( ) ) ) nodes . push ( node ) ; } } } return nodes ; }
Gets a list node from the XML document, based on a XPath query.
@param {String} xpath The XPath query to execute.
@param {Object} [contextNode] The XML DOM node to be used as the context
for the XPath query. The document root is used by default.
@returns {ArrayLike} An array containing all matched nodes. The array will
be empty if the query has no results.
@example
// Create the XML instance.
var xml = new CKEDITOR.xml( '<list><item id="test1" /><item id="test2" /></list>' );
// Get the first <item> node.
var itemNodes = xml.selectSingleNode( 'list/item' );
// Alert "item" twice, one for each <item>.
for ( var i = 0 ; i < itemNodes.length ; i++ )
alert( itemNodes[i].nodeName );
Gets a list node from the XML document based on a XPath query .