⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 xml-parser.js

📁 原名JSPackager
💻 JS
字号:
var ie5 = "test".replace(/\w+/,'$&') == "$&";

/**
 * @public
 * @constructor
 * @param <String> source
 */
function XMLParser(source){
  this.initialize(source);
}

$JSI.extend(XMLParser,SourceParser);
//ECMAParser.prototype = new SourceParser();

/**
 * keywords Regexp.
 * default is for javascript 
 * @protected
 */
XMLParser.prototype.setKeywordsGroup({'':
['']});
/**

	   (<!\[CDATA\[\s*.*\s*\]\]>)
	   | (<!--\s*.*\s*?-->)
	   | (<)*(\w+)*\s*(\w+)\s*=\s*(".*?"|'.*?'|\w+)(/*>)*
	   | (</?)(.*?)(/?>)
 * partitions Regexp.
 * default is for javascript 
 * @protected
 */
 
var notCdata = "[^\\]]|\\][^\\]]|\\]\\][^>]";
var id = '[\\w_][\\w\\d-_.]*';
var str = '"(?:\\\\.|[^"\\n\\r])*"|'+"'(?:\\\\.|[^'\\n\\r])*'";
XMLParser.prototype.setPartitionsGroup(
{
      'cdata':'<\\!\\[[\\w]*\\['+notCdata+'\\]\\]>'//cdata
      ,'processor':'<\\?(?:[^\\?]|\\?[^>])*\\?>'//processor
      ,'comment':'<!--(?:[^-]|-[^-])*-->'//comment
      ,'begin':'<'+id+'(?:\\s+'+id+'\\s*=\\s*'+str+')*\\s*/?>' //string
      ,'end':'</'+id+'>'             //process
}
);
//ECMAParser.prototype = new SourceParser();
//<![ ... [ ... ]]>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -