Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有用于 Eclipse IDE的 MyBatisv=3.4.5和插件 MyBatis Generator 。v=1.3.7在我的 .xml 映射器中运行生成后,所有符号都已> <更改,请参见图片
v=3.4.5
v=1.3.7
> <
我发现 xml 映射器是正常的,但为什么会发生这种情况以及如何修复这个符号?
不确定您的问题是什么,但在 XML 中,某些字符不能放在 CDATA 部分(您在标签正文中看到的文本)中。
例如,要包含 a<它必须被编码为“XML 实体” <。否则它可能会与标签混淆。其他字符也需要编码。所以:
<
<
&
&
>
>
'
'
"
"
这是意料之中的,因为<并且&在正文标签中以明文形式是非法的。