Here you can find the source of isElement(Node node, String name)
protected static boolean isElement(Node node, String name)
//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); } }