Java XML Child Get getChild(Element element, String name)

Here you can find the source of getChild(Element element, String name)

Description

get Child

License

Open Source License

Declaration

public static Element getChild(Element element, String name) 

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 getChild(Element element, String name) {
        NodeList nodeList = element.getElementsByTagName(name);

        return (Element) nodeList.item(0);
    }//  w w w .j a va 2 s  . co  m
}

Related

  1. getChild(Element el, String name)
  2. getChild(Element element, String child)
  3. getChild(Element element, String name)
  4. getChild(Element element, String name)
  5. getChild(Element node, String tagName)
  6. getChild(Element parent, int i)