Code example for Document

Methods: renameNode

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