Java Code Examples for org.w3c.dom.Node.isSameNode()

The following are Jave code examples for showing how to use isSameNode() of the org.w3c.dom.Node class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
Example 1
Project: convertigo-engine   File: TwsDomTreeWrap.java   Source Code and License Vote up 5 votes
public String findTreeItem(Node elt) {
    for (Entry<String, Node> idToNode: idToNodes.entrySet()) {
        if (elt.isSameNode(idToNode.getValue())) {
            return idToNode.getKey();
        }
    }

    return null;
}
 
Example 2
Project: convertigo-engine   File: TwsTreeWalker.java   Source Code and License Vote up 4 votes
/**
 * Returns true if <code>m</code> is the same node <code>n</code>.
 */
private boolean isSameNode(Node m, Node n) {
    return (fUseIsSameNode) ? m.isSameNode(n) : m == n;
}