Java XML Node to Element isElement(Node node, String name)

Here you can find the source of isElement(Node node, String name)

Description

is Element

License

Open Source License

Declaration

protected static boolean isElement(Node node, String name) 

Method Source Code

//package com.java2s;
/*******************************************************************************
 * Copyright (c) 2005, 2007 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
     //from  ww w. j  a  v a2s .c  o m
 *******************************************************************************/

import org.w3c.dom.Node;

public class Main {
    protected static boolean isElement(Node node, String name) {
        return node.getNodeType() == Node.ELEMENT_NODE && node.getNodeName().equals(name);
    }
}

Related

  1. isElement(Node node)
  2. isElement(Node node)
  3. isElement(Node node)
  4. isElement(Node node)
  5. isElement(Node node)
  6. isElementByTag(Node node, String tagName)
  7. isElementContent(Node node)
  8. isElementNamed(Node node, String name)
  9. isElementNode(final Node target)