有人可以指導我使用Jaxb2Marshaller生成帶有特殊字符的XML '&','<','>'?我在StackOverflow上有幾個指針可以在spring配置文件中使用下面的代碼片段,但是同樣沒有效果&我繼續分別收到'& amp','& lt','& gt'。任何指針都會非常有幫助。如何顯示通過Jaxb2Marshaller生成的XML裏面的'&'
<bean id="marshaller" class="org.springframework.oxm.jaxb.Jaxb2Marshaller">
<property name="marshallerProperties">
<map>
<entry key="jaxb.encoding">
<value>UTF-8</value>
</entry>
</map>
您能否提供生成值和期望值的示例? –
生成的值:測試&值 ;期望值:測試和值 –