Code example for Document

Methods: renameNode

0
        } catch (DOMException e) {
        } 
    } 
 
    public void testRenameElementWithNamespace() { 
        document.renameNode(description, "http://sales", "desc");
        assertEquals("desc", description.getTagName());
        assertEquals("desc", description.getLocalName());
        assertEquals(null, description.getPrefix());
        assertEquals("http://sales", description.getNamespaceURI());
    } 
 
    public void testRenameElementWithPrefixAndNamespace() { 
        document.renameNode(description, "http://sales", "a:desc");
        assertEquals("a:desc", description.getTagName());
        assertEquals("desc", description.getLocalName());
        assertEquals("a", description.getPrefix());
        assertEquals("http://sales", description.getNamespaceURI());
    } 
 
    public void testRenameAttribute() {