Here you can find the source of getNodeLocalName(Node node)
public static String getNodeLocalName(Node node)
//package com.java2s; /******************************************************************************* * Crown Copyright (c) 2006, 2007, Copyright (c) 2006, 2007 Jiva Medical. * 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 w w w . j a v a 2s .c o m * Contributors: * Jiva Medical - initial API and implementation * B2 International - added generateXMLString(DocumentFragment, boolean) *******************************************************************************/ import org.w3c.dom.Node; public class Main { public static String getNodeLocalName(Node node) { String result = node.getLocalName(); if (result == null) result = node.getNodeName(); return result; } }