xml特殊字符转义

今天在启动应用时一直报错,如下:

2013-07-25 20:16:21,422 [] ERROR parser.XMLParser - Parse Fatal Error at line 211 column 122: The reference to entity "op" must end with the ';
' delimiter.
org.xml.sax.SAXParseException: The reference to entity "op" must end with the ';' delimiter.
	at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
	at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown Source)
	at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
	at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
	at org.apache.xerces.impl.XMLScanner.reportFatalError(Unknown Source)
	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEntityReference(Unknown Source)
	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
	at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
	at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
	at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
	at org.apache.commons.jelly.parser.XMLParser.parse(XMLParser.java:254)
	at org.apache.commons.jelly.JellyContext.compileScript(JellyContext.java:531)
	at org.apache.commons.jelly.JellyContext.runScript(JellyContext.java:666)
	at org.apache.commons.jelly.JellyContext.runScript(JellyContext.java:656)
	at org.apache.commons.jelly.JellyContext.runScript(JellyContext.java:578)
	at com.alibaba.common.configuration.jelly.JellyDigester.parse(JellyDigester.java:88)

 google后发现,xml中有些特殊字符需要进行转义,如下表:

&lt; < 小于号
&gt; > 大于号
&amp; &
&apos; ' 单引号
&quot; " 双引号

你可能感兴趣的:(特殊字符)