Code example for NamedNodeMap

Methods: getNamedItemNS

0
    @TestTargetNew( 
        level = TestLevel.PARTIAL, 
        notes = "Doesn't verify DOMException.", 
        method = "getNamedItem", 
        args = {java.lang.String.class}
    ) 
    public void testGetNamedItemNS1() throws Throwable { 
        Document doc;
        NodeList elementList;
        Node testEmployee;
        NamedNodeMap attributes;
        Attr domesticAttr;
        String attrName;
        doc = (Document) load("staffNS", builder);
        elementList = doc.getElementsByTagName("address");
        testEmployee = elementList.item(1);
        attributes = testEmployee.getAttributes();
        domesticAttr = (Attr) attributes.getNamedItemNS("http://www.usa.com",
                "domestic"); 
        attrName = domesticAttr.getNodeName();
        assertEquals("attrName", "dmstc:domestic", attrName);