Element root = doc.addElement("POCS");
//这个不起作用!
root.addAttribute("xmlns","http://test");
//这个才起作用!
Element root = doc.addElement("POCS", "http://test");
关于DOM4J生成XML的根节点带上xmlns的问题
最新推荐文章于 2021-03-21 21:46:32 发布
Element root = doc.addElement("POCS");
//这个不起作用!
root.addAttribute("xmlns","http://test");
//这个才起作用!
Element root = doc.addElement("POCS", "http://test");