Element root = null;
Document document = DocumentHelper.createDocument(root);
root = document.addElement("Message","http://www.chinaport.gov.cn/ENT");
上面代码解决 xmlns无效问题 ,Message是根节点。
format.setNewLineAfterDeclaration(false);
上面的解决第二行空行问题。
Element root = null;
Document document = DocumentHelper.createDocument(root);
root = document.addElement("Message","http://www.chinaport.gov.cn/ENT");
上面代码解决 xmlns无效问题 ,Message是根节点。
format.setNewLineAfterDeclaration(false);
上面的解决第二行空行问题。