OpenImmo/src/main/java/org/openestate/io/openimmo/converters/OpenImmo_1_2_4.java
protected void upgradeAnzahlBalkonTerrassenElements(Document doc) throws JaxenException {
        List nodes = XmlUtils.newXPath(
                "/io:openimmo/io:anbieter/io:immobilie/io:flaechen/io:anzahl_balkon_terrassen",
                doc).selectNodes(doc);
        for (Object item : nodes) {
            Element node = (Element) item;
            Element parentNode = (Element) node.getParentNode();
            String value = StringUtils.trimToNull(node.getTextContent());
            if (value != null) {
                Element newNode = (Element) XmlUtils.newXPath(
                        "io:anzahl_balkone", doc).selectSingleNode(parentNode);
                if (newNode == null) {
                    newNode = doc.createElementNS(StringUtils.EMPTY, "anzahl_balkone");
                    newNode.setTextContent(value);
                    parentNode.appendChild(newNode);
                } else if (StringUtils.isBlank(newNode.getTextContent())) {
                    newNode.setTextContent(value);
                }
            }
            parentNode.removeChild(node);
        }
    }
protected void upgradeAnzahlBalkonTerrassenElements(Document doc) throws JaxenException {
        List nodes = XmlUtils.newXPath(
                "/io:openimmo/io:anbieter/io:immobilie/io:flaechen/io:anzahl_balkon_terrassen",
                doc).selectNodes(doc);
        for (Object item : nodes) {
            Element node = (Element) item;
            Element parentNode = (Element) node.getParentNode();
            String value = StringUtils.trimToNull(node.getTextContent());
            if (value != null) {
                Element newNode = (Element) XmlUtils.newXPath(
                        "io:anzahl_balkone", doc).selectSingleNode(parentNode);
                if (newNode == null) {
                    newNode = doc.createElementNS(StringUtils.EMPTY, "anzahl_balkone");
                    newNode.setTextContent(value);
                    parentNode.appendChild(newNode);
                } else if (StringUtils.isBlank(newNode.getTextContent())) {
                    newNode.setTextContent(value);
                }
            }
            parentNode.removeChild(node);
        }
    }
Upgrade &lt;anzahl_balkon_terrassen&gt; elements to OpenImmo 1.2.4.
<p>
The &lt;anzahl_balkon_terrassen&gt; is not supported anymore in version
1.2.4. The element is replaced by &lt;anzahl_balkone&gt; and
&lt;anzahl_terrassen&gt;.
<p>
Any &lt;anzahl_balkon_terrassen&gt; element is removed. Its content is
copied into &lt;anzahl_balkone&gt;, if this element is not already present.

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