class DomHelper
{

    private DomHelper()
    {
    }

    public static Element getUniqueElementChild(Element description) throws XmpParsingException
    {<FILL_FUNCTION_BODY>}

    /**
     * Return the first child element of the element parameter. If there is no child, null is returned
     * 
     * @param description the parent element
     * @return the first child element. Might be null.
     */
    public static Element getFirstChildElement(Element description)
    {
        NodeList nl = description.getChildNodes();
        for (int i = 0; i < nl.getLength(); i++)
        {
            if (nl.item(i) instanceof Element)
            {
                return (Element) nl.item(i);
            }
        }
        return null;
    }

    public static List<Element> getElementChildren(Element description)
    {
        NodeList nl = description.getChildNodes();
        List<Element> ret = new ArrayList<>(nl.getLength());
        for (int i = 0; i < nl.getLength(); i++)
        {
            if (nl.item(i) instanceof Element)
            {
                ret.add((Element) nl.item(i));
            }
        }
        return ret;
    }

    public static QName getQName(Element element)
    {
        return new QName(element.getNamespaceURI(), element.getLocalName(), element.getPrefix());
    }

    public static boolean isRdfDescription(Element element)
    {
        return (XmpConstants.DEFAULT_RDF_PREFIX.equals(element.getPrefix()) && XmpConstants.DESCRIPTION_NAME
                .equals(element.getLocalName()));
    }

    public static boolean isParseTypeResource(Element element)
    {
        Attr parseType = element.getAttributeNodeNS(XmpConstants.RDF_NAMESPACE, XmpConstants.PARSE_TYPE);
        return parseType != null && XmpConstants.RESOURCE_NAME.equals(parseType.getValue());
    }

}

        NodeList nl = description.getChildNodes();
        int pos = -1;
        for (int i = 0; i < nl.getLength(); i++)
        {
            if (nl.item(i) instanceof Element)
            {
                if (pos >= 0)
                {
                    // invalid : found two child elements
                    throw new XmpParsingException(ErrorType.Undefined, "Found two child elements in " + description);
                }
                else
                {
                    pos = i;
                }
            }
        }
        return (Element) nl.item(pos);
    
<no_super_class>