Here you can find the source of isNodeInNS(Node nodeToCompare, String nsuri, String tagName)
Parameter | Description |
---|---|
nodeToCompare | __UNDOCUMENTED__ |
nsuri | __UNDOCUMENTED__ |
tagName | __UNDOCUMENTED__ |
public static boolean isNodeInNS(Node nodeToCompare, String nsuri, String tagName)
//package com.java2s; /*//from www . j a v a 2 s . c o m * Copyright (c) 2012. betterFORM Project - http://www.betterform.de * Licensed under the terms of BSD License */ import org.w3c.dom.*; public class Main { /** * __UNDOCUMENTED__ * * @param nodeToCompare __UNDOCUMENTED__ * @param nsuri __UNDOCUMENTED__ * @param tagName __UNDOCUMENTED__ * @return __UNDOCUMENTED__ */ public static boolean isNodeInNS(Node nodeToCompare, String nsuri, String tagName) { String ntcnsuri = nodeToCompare.getNamespaceURI(); if ((ntcnsuri != null) && (ntcnsuri.length() > 0)) { return (tagName.equals(nodeToCompare.getLocalName()) && ntcnsuri.equals(nsuri)); } else { return (tagName.equals(nodeToCompare.getNodeName())); } } }