2
* FCKeditor - The text editor for internet
3
* Copyright (C) 2003-2005 Frederico Caldeira Knabben
5
* Licensed under the terms of the GNU Lesser General Public License:
6
* http://www.opensource.org/licenses/lgpl-license.php
8
* For further information visit:
9
* http://www.fckeditor.net/
11
* "Support Open Source software. What about a donation today?"
13
* File Name: fckxml_ie.js
14
* FCKXml Class: class to load and manipulate XML files.
15
* (IE specific implementation)
18
* Frederico Caldeira Knabben (fredck@fckeditor.net)
23
if ( !( FCKXml = NS.FCKXml ) )
25
FCKXml = NS.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 ) ;
58
alert( 'Error loading "' + urlToCall + '"' ) ;
62
FCKXml.prototype.SelectNodes = function( xpath, contextNode )
68
return contextNode.selectNodes( xpath ) ;
70
return this.DOMDocument.selectNodes( xpath ) ;
73
FCKXml.prototype.SelectSingleNode = function( xpath, contextNode )
79
return contextNode.selectSingleNode( xpath ) ;
81
return this.DOMDocument.selectSingleNode( xpath ) ;
b'\\ No newline at end of file'
2
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
3
* Copyright (C) 2003-2008 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)
27
LoadUrl : function( urlToCall )
31
var oXmlHttp = FCKTools.CreateXmlObject( 'XmlHttp' ) ;
39
oXmlHttp.open( "GET", urlToCall, false ) ;
41
oXmlHttp.send( null ) ;
43
if ( oXmlHttp.status == 200 || oXmlHttp.status == 304 || ( oXmlHttp.status == 0 && oXmlHttp.readyState == 4 ) )
45
this.DOMDocument = oXmlHttp.responseXML ;
47
// #1426: Fallback if responseXML isn't set for some
48
// reason (e.g. improperly configured web server)
49
if ( !this.DOMDocument || this.DOMDocument.firstChild == null )
51
this.DOMDocument = FCKTools.CreateXmlObject( 'DOMDocument' ) ;
52
this.DOMDocument.async = false ;
53
this.DOMDocument.resolveExternals = false ;
54
this.DOMDocument.loadXML( oXmlHttp.responseText ) ;
59
this.DOMDocument = null ;
62
if ( this.DOMDocument == null || this.DOMDocument.firstChild == null )
65
if (window.confirm( 'Error loading "' + urlToCall + '"\r\nDo you want to see more info?' ) )
66
alert( 'URL requested: "' + urlToCall + '"\r\n' +
67
'Server response:\r\nStatus: ' + oXmlHttp.status + '\r\n' +
68
'Response text:\r\n' + oXmlHttp.responseText ) ;
72
SelectNodes : function( xpath, contextNode )
78
return contextNode.selectNodes( xpath ) ;
80
return this.DOMDocument.selectNodes( xpath ) ;
83
SelectSingleNode : function( xpath, contextNode )
89
return contextNode.selectSingleNode( xpath ) ;
91
return this.DOMDocument.selectSingleNode( xpath ) ;