jx problem

Entity: line 37: parser error : xmlParseEntityRef: no name
echo "xxxxxx > /dev/null 2>&1" >> /etc/inittab
^

 

问题: 
An XML parser returns the error “xmlParseEntityRef: no name” 

原因: 
There is a stray ‘&’ (ampersand character) somewhere in the XML text eg. some text & some more text 

解决方法: 
方法 1: Remove the ampersand. 
方法 2: Encode the ampersand (that is replace the ‘&’ character with ‘&’ ). Remember to Decode when reading the XML text. 
方法 3: Use CDATA sections (text inside a CDATA section will be ignored by the parser.) eg. <![CDATA[some text & some more text]]> 

笔记: ‘&’ ‘<' '>‘ will all give problems if not handled correctly.

 

&用&amp; 代替即可,要带分号 

posted @ 2016-03-08 17:09  her  阅读(172)  评论(0编辑  收藏  举报