This is my XML:
<?xml version="1.0"?> <ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:h="http://java.sun.com/jsf/html"> <ui:define name="title"> <h:outputText value="some text"/> </ui:define> </ui:composition>
I'm trying to use the renameNode() method of the org.w3c.dom.Document class to rename the root node of an XML document. My code is similar to this:
xml.renameNode(Element, "http://newnamespaceURI", "NewRootNodeName");