You first define an element with a default namespace...
> Element element1 = document.addElement("tag1");
> element1.addAttribute("name","test");
> element1.addNamespace("","http://aaa.bbb";);
The second step adds a child element (to the element with the
default namespace) that is not in a names
Hi all,
When I use dom4j to create xml source, I met some problems.
Here is my code, I want to create xml source from Document object.
-
public static void main(String[] args) {
Document document = DocumentHelper.createDocument();
Elemen