protected void downgradeParkenElements(Document doc) throws JaxenException {
        List nodes = XmlUtils.newXPath(
                "/io:openimmo/io:anbieter/io:immobilie/io:objektkategorie/io:objektart/io:parken",
                doc).selectNodes(doc);
        for (Object item : nodes) {
            Element node = (Element) item;
            Element parentNode = (Element) node.getParentNode();
            parentNode.removeChild(node);

            Element newNode = doc.createElementNS(StringUtils.EMPTY, "sonstige");
            newNode.setAttribute("sonstige_typ", "PARKFLACHE");
            parentNode.appendChild(newNode);
        }
    }
protected void downgradeParkenElements ( Document doc ) throws JaxenException { List nodes = XmlUtils . newXPath ( "/io:openimmo/io:anbieter/io:immobilie/io:objektkategorie/io:objektart/io:parken" , doc ) . selectNodes ( doc ) ; for ( Object item : nodes ) { Element node = ( Element ) item ; Element parentNode = ( Element ) node . getParentNode ( ) ; parentNode . removeChild ( node ) ; Element newNode = doc . createElementNS ( StringUtils . EMPTY , "sonstige" ) ; newNode . setAttribute ( "sonstige_typ" , "PARKFLACHE" ) ; parentNode . appendChild ( newNode ) ; } }
Replace &lt;parken&gt; elements with &lt;sonstige&gt; elements.
<p>
OpenImmo 1.2.2 does not support &lt;parken&gt; elements. Any occurence is
converted into &lt;sonstige&gt; elements.

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