code: private Element getChildElement(String name) {
          if (currentChild == null) {
              // element has no children.
              return null;
          }
          Node start = currentChild;
          do {
              Node node = currentChild;
              currentChild = currentChild.getNextSibling();
              if (currentChild == null) {
                  currentChild = currentElement.getFirstChild();
              }
              if (node.getNodeType() == Node.ELEMENT_NODE
                      && node.getNodeName().equals(name)) {
                  return (Element) node;
              }
          } while (currentChild != start);
          return null;
      }
docs: Lookup a child element by tag name.
  <p>
  Will round-robin search using the child field. When returning an element,
  child is set to next element after the found element.
  
  @param name
  The tag name to find.
  
  @return The child element or null.