Code example for Document

Methods: renameNode

0
        assertEquals("a", description.getPrefix());
        assertEquals("http://sales", description.getNamespaceURI());
    } 
 
    public void testRenameAttribute() { 
        document.renameNode(deluxe, null, "special");
        assertEquals("special", deluxe.getName());
        assertEquals("special", deluxe.getLocalName());
        assertEquals(null, deluxe.getPrefix());
        assertEquals(null, deluxe.getNamespaceURI());
    } 
 
    public void testRenameAttributeWithPrefix() { 
        try { 
            document.renameNode(deluxe, null, "a:special");
            fail();
        } catch (DOMException e) {
        } 
    } 
 
    public void testRenameAttributeWithNamespace() {