First, the escape character is used to configure the Xml file in Mybatis. Strictly speaking, it is invalid to have only the characters "& lt;" and "& amp;" in XML. Ellipsis, quotation marks, and greater than signs are valid, but it is a good habit to replace them with entity references. "& Lt;" produces an error because the parser interprets the character as the beginning of the new element. "& Amp;" also produces errors because the parser interprets the character as the beginning of the character entity. Solution: Use an Xml escape character instead of an escape character.
First, escape characters
Strictly speaking, it is illegal to configure the Xml file in Mybatis to have only the characters "<" and "&" in XML. Ellipsis, quotation marks, and greater than signs are valid, but it is a good habit to replace them with entity references.
"<" Produces an error because the parser interprets the character as the beginning of the new element.
"&" Also produces an error because the parser interprets the character as the beginning of the character entity.
Solution: Use an Xml escape character instead:
Escape characters |
Symbol |
Introduction |
< |
< |
Less |
> |
> |
Greater |
& |
& |
And |
' |
' |
Single quotes |
" |
" |
Double quotation marks |
Second, CDATA
CDATA refers to the text Data that should not be parsed by the XML parser (Unparsed Character Data ). All content in the CDATA section is ignored by the parser. CDATA</code></strong> 开始,由<strong><code>
The following is an instance:
Second, CDATA
when min(starttime)<='12:00' and max(endtime)<='12:00'
Comments about CDATA:
The CDATA part cannot contain the string "]> ". The nested CDATA section is not allowed.
The "]>" ending with the CDATA part cannot contain spaces or lines.
The above is a detailed description of how Mybatis processes numbers greater than and smaller than in Xml. For more information, see other related articles in the first PHP community!