Return true if the given node is an element with the given
           name and optional namespace uri.
761719
def isElement(self, node, name, nsuri=None):
        """"""
        if node.nodeType != node.ELEMENT_NODE:
            return 0
        return node.localName == name and \
               (nsuri is None or self.nsUriMatch(node.namespaceURI, nsuri))
1023704
function isHTMLNode(html) {
    if (typeof HTMLElement === 'object') {
        return (html && (html instanceof HTMLElement || !!html.nodeType));
    }

    return !!(html && html.nodeType);
}
813699
def has_property(node_uri, property_name, ossos_base=True):
    
    if get_property(node_uri, property_name, ossos_base) is None:
        return False
    else:
        return True
1148855
public function isLocalElement($element) {
        $uri = $element->namespaceURI;
        if (empty($uri)) {
            return false;
        }

        return isset(static::$local_ns[$uri]);
    }
1206643
def _xml_namespace_strip(root):
    # type: (ET.Element) -> None
    """"""
    if '}' not in root.tag:
        return  # Nothing to do, no namespace present

    for element in root.iter():
        if '}' in element.tag:
            element.tag = element.tag.split('}')[1]
        else:  # pragma: no cover
            # We should never get here. If there is a namespace, then the namespace should be
            # included in all elements.
            pass
1095246
public static boolean isXML(Node o) {
    return o == null ? false
        : !"HTML".equals(getOwnerDocument(o).getDocumentElement().getNodeName());
  }
140303
public boolean containsElement(Element element) {
        String deepName = getDeepName(element);
        return elementNameSortOrderMap.containsKey(deepName);
    }
657748
def xml_namespace(node, name, uri, namespaces = {})
      XML::Namespace.new(node, name, uri)
    end
695103
private static void getNamespaceBindings(Element element, Map<String, String> namespaceMap) {
    if (element == null) {
      return;
    }
    NamedNodeMap attrs = element.getAttributes();
    for (int i = 0; i < attrs.getLength(); i++) {
      Node node = attrs.item(i);
      String name = node.getNodeName();
      if ((name != null && (XMLConstants.XMLNS_ATTRIBUTE.equals(name) || name.startsWith(XMLConstants.XMLNS_ATTRIBUTE + ":")))) {
        namespaceMap.put(name, node.getNodeValue());
      }
    }
    Node parent = element.getParentNode();
    if (parent instanceof Element) {
      getNamespaceBindings((Element) parent, namespaceMap);
    }
  }
1008942
public static boolean isAnonymousNodeIRI(String uri) {
        return uri != null && uri.startsWith(PREFIX) && uri.contains(NODE_ID_PREFIX);
    }
519741
function hasProperty(node, name) {
  var props
  var value

  if (!node || !name || typeof node !== 'object' || node.type !== 'element') {
    return false
  }

  props = node.properties
  value = props && own.call(props, name) && props[name]

  return value !== null && value !== undefined && value !== false
}
1321852
def get_namespace_and_tag(name):
        

        if isinstance(name, str):
            if name[0] == "{":
                uri, ignore, tag = name[1:].partition("}")
            else:
                uri = None
                tag = name
        else:
            uri = None
            tag = None
        return uri, tag
1248455
protected String lookupNamespaceURIImpl(String name) {
        String prefix = getPrefixFromQualifiedName(name);
        String namespaceURI = this.xmlNode.lookupNamespaceURI(prefix);
        return namespaceURI;
    }
653959
def namespace_uri(self, name):
        
        a_node = self.adapter.get_node_attribute_node(self.impl_element, name)
        if a_node is None:
            return None
        return self.adapter.get_node_namespace_uri(a_node)
246495
def is_xpath_selector(selector):
    
    if (selector.startswith('/') or selector.startswith('./') or (
            selector.startswith('('))):
        return True
    return False
508902
def getElement(self, node, name, nsuri=None, default=join):
        """"""
        nsmatch = self.nsUriMatch
        ELEMENT_NODE = node.ELEMENT_NODE
        for child in node.childNodes:
            if child.nodeType == ELEMENT_NODE:
                if ((child.localName == name or name is None) and
                    (nsuri is None or nsmatch(child.namespaceURI, nsuri))
                    ):
                    return child
        if default is not join:
            return default
        raise KeyError, name
1233186
function isIgnore(node) {
            let target = node
            while (target.type === "HTMLElement") {
                if (options.ignoreNames.indexOf(target.name) >= 0) {
                    // ignore element name
                    return true
                }
                target = target.parent
            }
            return false
        }