Java XML Element Get getElement(Element el, String label)

Here you can find the source of getElement(Element el, String label)

Description

get Element

License

Open Source License

Declaration

public static Element getElement(Element el, String label) 

Method Source Code


//package com.java2s;
//License from project: Open Source License 

import org.w3c.dom.*;

public class Main {
    public static Element getElement(Element el, String label) {
        NodeList l = el.getElementsByTagName(label);
        if (l.getLength() < 1)
            return null;
        return (Element) l.item(0);
    }//from   www  . jav  a  2s .c o m
}

Related

  1. getElement(Element config, String elementName)
  2. getElement(Element config, String elementName)
  3. getElement(Element e, String localName)
  4. getElement(Element e, String name)
  5. getElement(Element e, String nsUri, String localName)
  6. getElement(Element el, String tagName, int index)
  7. getElement(Element el, String... path)
  8. getElement(Element elem, String name)
  9. getElement(Element elem, String path)