Here you can find the source of isInNamespace(Node node, String namespace)
Node
belongs to the namespace with the given String
name.
Parameter | Description |
---|---|
node | the <code>Node</code> to check |
namespace | the <code>String</code> namespace |
Node
namespace matches, else false
public static boolean isInNamespace(Node node, String namespace)
//package com.java2s; import org.w3c.dom.Node; public class Main { /**/*from ww w . j a va 2 s. com*/ * Determines if the given <code>Node</code> belongs to the namespace with the given <code>String</code> name. * * @param node the <code>Node</code> to check * @param namespace the <code>String</code> namespace * @return true if the <code>Node</code> namespace matches, else false */ public static boolean isInNamespace(Node node, String namespace) { return namespace.equals(node.getNamespaceURI()); } }