Code example for Node

Methods: getAttributes, getParentNode

0
        NodeList addresses;
 
        doc = (Document) load("staffNS", builder);
        docImp = (Document) load("staff", builder);
 
        addresses = doc
                .getElementsByTagNameNS("http://www.nist.gov", "address");
        element = (Element) addresses.item(1);
        assertNotNull("empAddressNotNull", element);
        attr = element.getAttributeNodeNS("http://www.nist.gov", "zone");
        attrImp = (Attr) docImp.importNode(attr, true);
        ownerElement = attrImp.getOwnerElement();
        assertNull("attrgetownerelement04", ownerElement);
    } 
    @TestTargetNew( 
        level = TestLevel.PARTIAL, 
        notes = "Doesn't verify that getOwnerElement returns null if an attribute is not in use.", 
        method = "getOwnerElement", 
        args = {} 
    ) 
    public void testGetOwnerElement5() throws Throwable {