OpenImmo/src/main/java/org/openestate/io/openimmo/converters/OpenImmo_1_2_4.java
protected void downgradeAnhangElements(Document doc) throws JaxenException {
        List nodes = XmlUtils.newXPath(
                "/io:openimmo/io:anbieter/io:anhang | " +
                        "/io:openimmo/io:anbieter/io:immobilie/io:anhaenge/io:anhang",
                doc).selectNodes(doc);
        for (Object item : nodes) {
            Element node = (Element) item;

            String value = StringUtils.trimToNull(node.getAttribute("gruppe"));
            if ("QRCODE".equalsIgnoreCase(value))
                node.removeAttribute("gruppe");
            else if ("FILM".equalsIgnoreCase(value))
                node.removeAttribute("gruppe");
            else if ("FILMLINK".equalsIgnoreCase(value))
                node.removeAttribute("gruppe");

            value = StringUtils.trimToNull(node.getAttribute("location"));
            if ("REMOTE".equalsIgnoreCase(value))
                node.setAttribute("location", "EXTERN");

            List childNodes = XmlUtils.newXPath("io:check", doc)
                    .selectNodes(node);
            for (Object childItem : childNodes) {
                node.removeChild((Node) childItem);
            }
        }
    }
protected void downgradeAnhangElements(Document doc) throws JaxenException {
        List nodes = XmlUtils.newXPath(
                "/io:openimmo/io:anbieter/io:anhang | " +
                        "/io:openimmo/io:anbieter/io:immobilie/io:anhaenge/io:anhang",
                doc).selectNodes(doc);
        for (Object item : nodes) {
            Element node = (Element) item;

            String value = StringUtils.trimToNull(node.getAttribute("gruppe"));
            if ("QRCODE".equalsIgnoreCase(value))
                node.removeAttribute("gruppe");
            else if ("FILM".equalsIgnoreCase(value))
                node.removeAttribute("gruppe");
            else if ("FILMLINK".equalsIgnoreCase(value))
                node.removeAttribute("gruppe");

            value = StringUtils.trimToNull(node.getAttribute("location"));
            if ("REMOTE".equalsIgnoreCase(value))
                node.setAttribute("location", "EXTERN");

            List childNodes = XmlUtils.newXPath("io:check", doc)
                    .selectNodes(node);
            for (Object childItem : childNodes) {
                node.removeChild((Node) childItem);
            }
        }
    }
Downgrade &lt;anhang&gt; elements to OpenImmo 1.2.3.
<p>
The options "QRCODE", "FILM", "FILMLINK" for the "gruppe" attribute of
&lt;anhang&gt; elements are not available in version 1.2.3.
<p>
The option "REMOTE" for the "location" attribute of
&lt;anhang&gt; elements is not available in version 1.2.3.
<p>
The the child element &lt;check&gt; of &lt;anhang&gt; elements is not
available in version 1.2.3.

@param doc OpenImmo document in version 1.2.4
@throws JaxenException if xpath evaluation failed