OpenImmo/src/main/java/org/openestate/io/openimmo/converters/OpenImmo_1_2_2.java
protected void upgradeEnergiepassElements(Document doc) throws JaxenException {
        List nodes = XmlUtils.newXPath(
                "/io:openimmo/io:anbieter/io:immobilie/io:zustand_angaben/io:energiepass/io:art",
                doc).selectNodes(doc);
        for (Object item : nodes) {
            Element node = (Element) item;
            Element parentNode = (Element) node.getParentNode();

            Element newNode = doc.createElementNS(StringUtils.EMPTY, "epart");
            newNode.setTextContent(node.getTextContent());

            parentNode.replaceChild(newNode, node);
        }
    }
protected void upgradeEnergiepassElements(Document doc) throws JaxenException {
        List nodes = XmlUtils.newXPath(
                "/io:openimmo/io:anbieter/io:immobilie/io:zustand_angaben/io:energiepass/io:art",
                doc).selectNodes(doc);
        for (Object item : nodes) {
            Element node = (Element) item;
            Element parentNode = (Element) node.getParentNode();

            Element newNode = doc.createElementNS(StringUtils.EMPTY, "epart");
            newNode.setTextContent(node.getTextContent());

            parentNode.replaceChild(newNode, node);
        }
    }
protected void upgradeEnergiepassElements ( Document doc ) throws JaxenException { List nodes = XmlUtils . newXPath ( "/io:openimmo/io:anbieter/io:immobilie/io:zustand_angaben/io:energiepass/io:art" , doc ) . selectNodes ( doc ) ; for ( Object item : nodes ) { Element node = ( Element ) item ; Element parentNode = ( Element ) node . getParentNode ( ) ; Element newNode = doc . createElementNS ( StringUtils . EMPTY , "epart" ) ; newNode . setTextContent ( node . getTextContent ( ) ) ; parentNode . replaceChild ( newNode , node ) ; } }
Upgrade &lt;energiepass&gt; elements to OpenImmo 1.2.2.
<p>
The &lt;art&gt; child element of the &lt;energiepass&gt; element is
renamed to &lt;epart&gt; in version 1.2.2.

@param doc OpenImmo document in version 1.2.1
@throws JaxenException if xpath evaluation failed
Upgrade &lt ; energiepass&gt ; elements to OpenImmo 1 . 2 . 2 . <p > The &lt ; art&gt ; child element of the &lt ; energiepass&gt ; element is renamed to &lt ; epart&gt ; in version 1 . 2 . 2 .