[
Lists Home |
Date Index |
Thread Index
]
It's better to create the element in the namespace you want rather
than trying to change it, eg:
Document svgDoc =
domImplementation.createDocument("http://www.w3.org/2000/svg", "svg",
null);
Element elt = svgDoc.createElementNS("http://www.example.com/", "boo");
svgDoc.getDocumentElement().appendChild(elt);
results in
<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg">
<boo xmlns="http://www.example.com/"/>
</svg>
Pete
|