public XMLElement getChild(String name) {

        // The first matching child will be kept here
        Node child = null;

        // Iterate over all the child nodes
        for (Node node : new NodeListIterator<Node>(element.getChildNodes()).toIterable()) {

            // Look for Element instances that match the name given
            if (node instanceof Element && name.equals(node.getNodeName())) {

                // If the child is already set, we can't handle this
                if (child != null) {
                    throw new IllegalStateException("More than one element with the name: " + name);
                }

                // Save the child node
                child = node;
            }
        }

        // Return null if no child was found
        if (child == null) {
            return null;
        }

        // Get the element
        return new XMLElement((Element) child);
    }