Code example for Element

Methods: setUserData

        assertEquals("http://sales", deluxe.getNamespaceURI());
    public void testUserDataHandlerNotifiedOfRenames() { 
        RecordingHandler handler = new RecordingHandler();
        description.setUserData("a", "apple", handler);
        deluxe.setUserData("b", "banana", handler);
        standard.setUserData("c", "cat", handler);
        document.renameNode(deluxe, null, "special");
        document.renameNode(description, null, "desc");
        Set<String> expected = new HashSet<String>();
        expected.add(notification(NODE_RENAMED, "a", "apple", description, null));
        expected.add(notification(NODE_RENAMED, "b", "banana", deluxe, null));
        assertEquals(expected, handler.calls);
    public void testRenameToInvalid() { 
        try { 
Connect your IDE to all the code out there  Get Codota for Java