📄 xml-parser.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 + -