code: public static Element getElement(Element parent, String tagName) {
          List<Element> children = getElements(parent, tagName);
  
          if (children.isEmpty()) {
              return null;
          } else {
              return children.get(0);
          }
      }
docs: Gets the immediately descendant element from the parent element.
  
  @param parent the parent element in the element tree
  @param tagName the specified tag name.
  @return immediately descendant element of parent element, NULL otherwise.