Node insertBefore(Node newChild, Node refChild)
Inserts the node newChild before the existing child node refChild. 这是 org.w3c.dom.Node 类型的一个方法,可以在某个指定的节点前插入新节点。jdom 没用过,应该有类似方法。
Inserts the node newChild before the existing child node refChild. 这是 org.w3c.dom.Node 类型的一个方法,可以在某个指定的节点前插入新节点。jdom 没用过,应该有类似方法。
Element channel = new Element("channel");
Element link = new Element("link");
Element description = new Element("description");List content = channel.getContent();
content.add(0,description);
content.add(0,link);