1

从 xml 标头中删除独立存在一些问题。我试过了:

 marshaller.setProperty("com.sun.xml.internal.bind.xmlDeclaration", Boolean.TRUE);
 marshaller.setProperty("com.sun.xml.internal.bind.xmlHeaders", "<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
4

0 回答 0