How can I, given a w3c DOM (Java\'s default implementation, specifically) change the namespace of every element/attribute/node in that DOM? Efficiently, preferably. The DO
The namespace is changed on every element without a defined namespace prefix by applying a targetnamespace attribute to your root element. Doing this will also require that you then alter each of your elements with a namespace prefix. You can make this prefix change manually or write some script logic to walk your DOM tree to applying it only where necessary.
Here is more reading about the targetnamespace attribute and the nonamespaceschema attribute:
http://www.xml.com/pub/a/2000/11/29/schemas/part1.html?page=8 http://www.computerpoweruser.com/editorial/article.asp?article=articles%2Farchive%2Fc0407%2F48c07%2F48c07.asp