OpenImmo/src/main/java/org/openestate/io/openimmo/converters/OpenImmo_1_2_3.java
protected void upgradeZinshausRenditeobjektElements(Document doc) throws JaxenException {
        List nodes = XmlUtils.newXPath(
                "/io:openimmo/io:anbieter/io:immobilie/io:objektkategorie/io:objektart/io:haus[@haustyp]",
                doc).selectNodes(doc);
        for (Object item : nodes) {
            Element node = (Element) item;
            Element parent = (Element) node.getParentNode();
            String value = StringUtils.trimToNull(node.getAttribute("haustyp"));
            if ("PFLEGEHEIM".equalsIgnoreCase(value)) {
                parent.removeChild(node);
                Element newNode = doc.createElementNS(StringUtils.EMPTY, "zinshaus_renditeobjekt");
                newNode.setAttribute("zins_typ", "PFLEGEHEIM");
                parent.appendChild(newNode);
            } else if ("SANATORIUM".equalsIgnoreCase(value)) {
                parent.removeChild(node);
                Element newNode = doc.createElementNS(StringUtils.EMPTY, "zinshaus_renditeobjekt");
                newNode.setAttribute("zins_typ", "SANATORIUM");
                parent.appendChild(newNode);
            } else if ("SENIORENHEIM".equalsIgnoreCase(value)) {
                parent.removeChild(node);
                Element newNode = doc.createElementNS(StringUtils.EMPTY, "zinshaus_renditeobjekt");
                newNode.setAttribute("zins_typ", "SENIORENHEIM");
                parent.appendChild(newNode);
            } else if ("BETREUTES-WOHNEN".equalsIgnoreCase(value)) {
                parent.removeChild(node);
                Element newNode = doc.createElementNS(StringUtils.EMPTY, "zinshaus_renditeobjekt");
                newNode.setAttribute("zins_typ", "BETREUTES-WOHNEN");
                parent.appendChild(newNode);
            }
        }
    }
protected void upgradeZinshausRenditeobjektElements(Document doc) throws JaxenException {
        List nodes = XmlUtils.newXPath(
                "/io:openimmo/io:anbieter/io:immobilie/io:objektkategorie/io:objektart/io:haus[@haustyp]",
                doc).selectNodes(doc);
        for (Object item : nodes) {
            Element node = (Element) item;
            Element parent = (Element) node.getParentNode();
            String value = StringUtils.trimToNull(node.getAttribute("haustyp"));
            if ("PFLEGEHEIM".equalsIgnoreCase(value)) {
                parent.removeChild(node);
                Element newNode = doc.createElementNS(StringUtils.EMPTY, "zinshaus_renditeobjekt");
                newNode.setAttribute("zins_typ", "PFLEGEHEIM");
                parent.appendChild(newNode);
            } else if ("SANATORIUM".equalsIgnoreCase(value)) {
                parent.removeChild(node);
                Element newNode = doc.createElementNS(StringUtils.EMPTY, "zinshaus_renditeobjekt");
                newNode.setAttribute("zins_typ", "SANATORIUM");
                parent.appendChild(newNode);
            } else if ("SENIORENHEIM".equalsIgnoreCase(value)) {
                parent.removeChild(node);
                Element newNode = doc.createElementNS(StringUtils.EMPTY, "zinshaus_renditeobjekt");
                newNode.setAttribute("zins_typ", "SENIORENHEIM");
                parent.appendChild(newNode);
            } else if ("BETREUTES-WOHNEN".equalsIgnoreCase(value)) {
                parent.removeChild(node);
                Element newNode = doc.createElementNS(StringUtils.EMPTY, "zinshaus_renditeobjekt");
                newNode.setAttribute("zins_typ", "BETREUTES-WOHNEN");
                parent.appendChild(newNode);
            }
        }
    }
protected void upgradeZinshausRenditeobjektElements ( Document doc ) throws JaxenException { List nodes = XmlUtils . newXPath ( "/io:openimmo/io:anbieter/io:immobilie/io:objektkategorie/io:objektart/io:haus[@haustyp]" , doc ) . selectNodes ( doc ) ; for ( Object item : nodes ) { Element node = ( Element ) item ; Element parent = ( Element ) node . getParentNode ( ) ; String value = StringUtils . trimToNull ( node . getAttribute ( "haustyp" ) ) ; if ( "PFLEGEHEIM" . equalsIgnoreCase ( value ) ) { parent . removeChild ( node ) ; Element newNode = doc . createElementNS ( StringUtils . EMPTY , "zinshaus_renditeobjekt" ) ; newNode . setAttribute ( "zins_typ" , "PFLEGEHEIM" ) ; parent . appendChild ( newNode ) ; } else if ( "SANATORIUM" . equalsIgnoreCase ( value ) ) { parent . removeChild ( node ) ; Element newNode = doc . createElementNS ( StringUtils . EMPTY , "zinshaus_renditeobjekt" ) ; newNode . setAttribute ( "zins_typ" , "SANATORIUM" ) ; parent . appendChild ( newNode ) ; } else if ( "SENIORENHEIM" . equalsIgnoreCase ( value ) ) { parent . removeChild ( node ) ; Element newNode = doc . createElementNS ( StringUtils . EMPTY , "zinshaus_renditeobjekt" ) ; newNode . setAttribute ( "zins_typ" , "SENIORENHEIM" ) ; parent . appendChild ( newNode ) ; } else if ( "BETREUTES-WOHNEN" . equalsIgnoreCase ( value ) ) { parent . removeChild ( node ) ; Element newNode = doc . createElementNS ( StringUtils . EMPTY , "zinshaus_renditeobjekt" ) ; newNode . setAttribute ( "zins_typ" , "BETREUTES-WOHNEN" ) ; parent . appendChild ( newNode ) ; } } }
Upgrade &lt;zinshaus_renditeobjekt&gt; elements to OpenImmo 1.2.3.
<p>
The options "PFLEGEHEIM", "SANATORIUM", "SENIORENHEIM", "BETREUTES-WOHNEN"
for the "haustyp" attribute of &lt;haus&gt; elements are placed in the
&lt;zinshaus_renditeobjekt&gt; element in version 1.2.3.

@param doc OpenImmo document in version 1.2.2
@throws JaxenException if xpath evaluation failed
Upgrade &lt ; zinshaus_renditeobjekt&gt ; elements to OpenImmo 1 . 2 . 3 . <p > The options PFLEGEHEIM SANATORIUM SENIORENHEIM BETREUTES - WOHNEN for the haustyp attribute of &lt ; haus&gt ; elements are placed in the &lt ; zinshaus_renditeobjekt&gt ; element in version 1 . 2 . 3 .