1. In the sql statement of xml, you cannot directly use the greater-than sign and the less-than sign to use escape characters
If the less than sign is used, an error will be reported as follows:
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.
escape character
< |
< |
Less than sign |
> |
> |
greater than sign |
& |
& |
and |
' |
’ |
apostrophe |
" |
" |
Double quotes |
Note:
Tags such as <where> <if> in SQL statements marked with <![CDATA[ ]]> will not be parsed