2
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
3
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
7
* Licensed under the terms of any of the following licenses at your
10
* - GNU General Public License Version 2 or later (the "GPL")
11
* http://www.gnu.org/licenses/gpl.html
13
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
14
* http://www.gnu.org/licenses/lgpl.html
16
* - Mozilla Public License Version 1.1 or later (the "MPL")
17
* http://www.mozilla.org/MPL/MPL-1.1.html
21
* FCKXml Class: class to load and manipulate XML files.
22
* (IE specific implementation)
25
var FCKXml = function()
30
FCKXml.prototype.LoadUrl = function( urlToCall )
34
var oXmlHttp = FCKTools.CreateXmlObject( 'XmlHttp' ) ;
42
oXmlHttp.open( "GET", urlToCall, false ) ;
44
oXmlHttp.send( null ) ;
46
if ( oXmlHttp.status == 200 || oXmlHttp.status == 304 )
47
this.DOMDocument = oXmlHttp.responseXML ;
48
else if ( oXmlHttp.status == 0 && oXmlHttp.readyState == 4 )
50
this.DOMDocument = FCKTools.CreateXmlObject( 'DOMDocument' ) ;
51
this.DOMDocument.async = false ;
52
this.DOMDocument.resolveExternals = false ;
53
this.DOMDocument.loadXML( oXmlHttp.responseText ) ;
57
this.DOMDocument = null ;
60
if ( this.DOMDocument == null || this.DOMDocument.firstChild == null )
63
if (window.confirm( 'Error loading "' + urlToCall + '"\r\nDo you want to see more info?' ) )
64
alert( 'URL requested: "' + urlToCall + '"\r\n' +
65
'Server response:\r\nStatus: ' + oXmlHttp.status + '\r\n' +
66
'Response text:\r\n' + oXmlHttp.responseText ) ;
70
FCKXml.prototype.SelectNodes = function( xpath, contextNode )
76
return contextNode.selectNodes( xpath ) ;
78
return this.DOMDocument.selectNodes( xpath ) ;
81
FCKXml.prototype.SelectSingleNode = function( xpath, contextNode )
87
return contextNode.selectSingleNode( xpath ) ;
89
return this.DOMDocument.selectSingleNode( xpath ) ;
b'\\ No newline at end of file'