MyBatis after generate greater than symbol

761 Views Asked by At

I have MyBatis v=3.4.5 and plugin MyBatis Generator v=1.3.7 for Eclipse IDE. After i run generate in my .xml mappers all symbols > < was changed see image enter image description here

I found that it was normal for xml mappers but why it was happened and how to fix this symbols ?

1

There are 1 best solutions below

0
On

Not sure what your question is but in XML some characters cannot be placed in a CDATA section (the text you see in the body of the tags).

For example, to include a < it must be encoded as the "XML entity" &lt;. Otherwise it could be confused for a tag. Other characters also need to be encoded. Therefore:

  • < must be encoded as &lt;.
  • & must be encoded as &amp;.
  • > can be encoded as &gt;. This is your case.
  • ' (single quote) can be encoded as &apos;.
  • " (double quote) can be encoded as &quot;.

This is expected since < and & are illegal in plain form in the body tags.