code: private static Element getFirstNamedElement(Element element, String name) {
  		NodeList list = element.getElementsByTagName(name);
  		if (list.getLength() == 0) {
  			return null;
  		}
  
  		return (Element) list.item(0);
  	}
docs: Get the first child named as specified from the passed XML element
  
  @param element
  The element whose children are interogated
  @param name
  The name of the element to retrieve
  @return The requested element