一、在xml的sql語句中,不能直接用大於號、小於號要用轉義字符sql
若是用小於號會報錯誤以下:apache
org.apache.ibatis.builder.BuilderException: Error creating document instance. Cause: org.xml.sax.SAXParseException: The content of elements must consist of well-formed character data or markup.ui
轉義字符spa
< orm |
<xml |
小於號 ci |
>element |
> io |
大於號table |
& |
& |
和 |
' |
’ |
單引號 |
" |
" |
雙引號 |
注意:
<![CDATA[ ]]>標記的sql語句中的<where> <if>等標籤不會被解析