Java XML Last Child Element getLastChildWithTagNameNS(Element parent, String namespaceURI, String localName)

Here you can find the source of getLastChildWithTagNameNS(Element parent, String namespaceURI, String localName)

Description

get Last Child With Tag Name NS

License

Open Source License

Declaration

public static Element getLastChildWithTagNameNS(Element parent,
            String namespaceURI, String localName) 

Method Source Code

//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
}

Related

  1. getLastChildElement(Node node)
  2. getLastChildElement(Node parent)
  3. getLastChildElement(Node parent)
  4. getLastChildElement(Node start)
  5. getLastChildElementNS(Node parent, String uri, String localpart)
  6. getLastNamedChildNode(Node root, String nodeName)
  7. getLastNodeChild(Node node)
  8. getLastVisibleChildElement(Node parent)