Here is a description of the special character processing method in mybatis xml. The specific content is as follows:
1. CDATA area:
Its full name is character data, starting with "<![CDATA[ ", ending with " ]]> ", embedding raw data that is not wanted to be parsed by the parsed program between the two. The parser does not parse the content in the CDATA area, but instead handing the data to the downstream program intact.
2. Special characters:
xml means: <= less than or equal to, >= greater than or equal to, such a mark needs to be added: <![CDATA[ ]]> There is a symbol of & in xml, which requires
<![CDATA[&]]>Say it&
<= Less than or equal to: <![CDATA[ <= ]]>
>= Greater than or equal to: <![CDATA[ >= ]]>
3. Some special characters can also be replaced by the following substitute symbols.
Special characters substitute symbols
& &
< <
> >
"
' '
Let's take a look at the processing method of mybatis special symbols
The first way to write (1):
Original symbol < <= > >= & ' " Replace symbol < <= > >= & ' " For example: sql is as follows: create_date_time >= #{startTime} and create_date_time <= #{endTime} The second way of writing (2):
greater than or equal to <![CDATA[ >= ]]> Less than or equal to <![CDATA[ <= ]]> For example: sql is as follows: create_date_time <![CDATA[ >= ]]> #{startTime} and create_date_time <![CDATA[ <= ]]> #{endTime}Summarize
The above is the special character processing and special symbols in mybatis xml introduced to you by the editor. I hope it will be helpful to you. If you have any questions, please leave me a message and the editor will reply to you in time. Thank you very much for your support to Wulin.com website!