Code example for Comment

Methods: lookupPrefix

0
        assertEquals("a", option2Reference.lookupPrefix("http://addons"));
        assertEquals("a", wafflemaker.lookupPrefix("http://addons"));
        assertEquals("a", nutrition.lookupPrefix("http://addons"));
        assertEquals(null, vitamins.lookupPrefix("http://addons"));
        assertEquals(null, vitaminsXmlnsA.lookupPrefix("http://addons"));
        assertEquals(null, comment.lookupPrefix("http://addons"));
        assertEquals(null, vitaminc.lookupPrefix("http://addons"));
        assertEquals(null, vitamincText.lookupPrefix("http://addons"));
    } 
 
    public void testLookupPrefixWithUnusedUri() { 
        for (Node node : allNodes) {
            assertEquals(null, node.lookupPrefix("http://unused"));
        } 
    } 
 
    public void testLookupPrefixWithNullUri() { 
        for (Node node : allNodes) {
            assertEquals(null, node.lookupPrefix(null));
        }