Here you can find the source of getLastChildWithTagNameNS(Element parent, String namespaceURI, String localName)
public static Element getLastChildWithTagNameNS(Element parent, String namespaceURI, String localName)
//package com.java2s; //License from project: Open Source License import org.w3c.dom.Element; import org.w3c.dom.NodeList; public class Main { public static Element getLastChildWithTagNameNS(Element parent, String namespaceURI, String localName) { final NodeList elements = parent.getElementsByTagNameNS( namespaceURI, localName); return (elements.getLength() > 0) ? (Element) (elements .item(elements.getLength() - 1)) : null; }//w w w . j a va 2s . c o m }