web/assets/libs/ckeditor/4.6.7/plugins/xml/plugin.js
(开头部分) 1KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
/**
* @license Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or http://ckeditor.com/license
*/
/**
* @fileOverview Defines the {@link CKEDITOR.xml} class, which represents a
* loaded XML document.
*/
( function() {
/* global ActiveXObject */
CKEDITOR.plugins.add( 'xml', {} );
/**
* Represents a loaded XML document.
*
* var xml = new CKEDITOR.xml( '<books><book title="My Book" /></books>' );
*
* @class
* @constructor Creates xml class instance.
* @param {Object/String} xmlObjectOrData A native XML (DOM document) object or
* a string containing the XML definition to be loaded.
*/
CKEDITOR.xml = function( xmlObjectOrData ) {
var baseXml = null;
if ( typeof xmlObjectOrData == 'object' )
baseXml = xmlObjectOrData;
else {
var data = ( xmlObjectOrData || '' ).replace( / /g, '\xA0' );
// Check ActiveXObject before DOMParser, because IE10+ support both, but
// there's no XPath support in DOMParser instance.
// Also, the only check for ActiveXObject which still works in IE11+ is with `in` operator.
if ( 'ActiveXObject' in window ) {
try {
baseXml = new ActiveXObject( 'MSXML2.DOMDocument' );
} catch ( e ) {
try {
baseXml = new ActiveXObject( 'Microsoft.XmlDom' );
} catch ( err ) {}
}
if ( baseXml ) {
baseXml.async = false;
baseXml.resolveExternals = false;
baseXml.validateOnParse = false;
baseXml.loadXML( data );
}
}
else if ( window.DOMParser ) {
baseXml = ( new DOMParser() ).parseFromString( data, 'text/xml' );
}
}
/**
* The native XML (DOM document) used by the class instance.
*
* @property {Object}
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。