Code example for Document

Methods: createAttributeNS

0
        Element ownerElement;
        String ownerElementName;
        Attr attr;
 
        doc = (Document) load("staffNS", builder);
        element = doc.createElement("root");
        attr = doc.createAttributeNS("http://www.w3.org/DOM/L1", "L1:att");
        element.setAttributeNodeNS(attr);
        ownerElement = attr.getOwnerElement();
        ownerElementName = ownerElement.getNodeName();
        assertEquals("attrgetownerelement02", "root", ownerElementName);
    } 
    @TestTargetNew( 
        level = TestLevel.PARTIAL, 
        notes = "Verifies that getOwnerElement returns null if an attribute is not in use.", 
        method = "getOwnerElement", 
        args = {} 
    ) 
    public void testGetOwnerElement3() throws Throwable { 
        Document doc;
        Node ownerElement;