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.
从 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\"?>");