Kyero/src/main/java/org/openestate/io/kyero/converters/Kyero_3.java
protected void upgradeNewBuildElements(Document doc) throws JaxenException {
        List nodes = XmlUtils.newXPath(
                "/io:root/io:property/io:price_freq",
                doc).selectNodes(doc);
        for (Object item : nodes) {
            Element node = (Element) item;
            Element parentNode = (Element) node.getParentNode();
            if (!"new_build".equalsIgnoreCase(node.getTextContent())) continue;
            node.setTextContent("sale");

            Element newBuildNode = doc.createElementNS(KyeroUtils.NAMESPACE, "new_build");
            newBuildNode.setTextContent("1");
            parentNode.appendChild(newBuildNode);
        }
    }
protected void upgradeNewBuildElements(Document doc) throws JaxenException {
        List nodes = XmlUtils.newXPath(
                "/io:root/io:property/io:price_freq",
                doc).selectNodes(doc);
        for (Object item : nodes) {
            Element node = (Element) item;
            Element parentNode = (Element) node.getParentNode();
            if (!"new_build".equalsIgnoreCase(node.getTextContent())) continue;
            node.setTextContent("sale");

            Element newBuildNode = doc.createElementNS(KyeroUtils.NAMESPACE, "new_build");
            newBuildNode.setTextContent("1");
            parentNode.appendChild(newBuildNode);
        }
    }
protected void upgradeNewBuildElements ( Document doc ) throws JaxenException { List nodes = XmlUtils . newXPath ( "/io:root/io:property/io:price_freq" , doc ) . selectNodes ( doc ) ; for ( Object item : nodes ) { Element node = ( Element ) item ; Element parentNode = ( Element ) node . getParentNode ( ) ; if ( ! "new_build" . equalsIgnoreCase ( node . getTextContent ( ) ) ) continue ; node . setTextContent ( "sale" ) ; Element newBuildNode = doc . createElementNS ( KyeroUtils . NAMESPACE , "new_build" ) ; newBuildNode . setTextContent ( "1" ) ; parentNode . appendChild ( newBuildNode ) ; } }
Upgrade &lt;new_build&gt; elements for Kyero 3.
<p>
The &lt;new_build&gt; elements are not available in version 2.1. Instead
the value "new_build" is used in the &lt;price_freq&gt; element.
<p>
Any occurrences of &lt;price_freq&gt;new_build&lt;/price_freq&gt; is
replaced by &lt;price_freq&gt;sale&lt;/price_freq&gt; and
&lt;new_build&gt;1&lt;/new_build&gt; is added to the property.

@param doc Kyero document in version 2.1
@throws JaxenException if xpath evaluation failed
Upgrade &lt ; new_build&gt ; elements for Kyero 3 . <p > The &lt ; new_build&gt ; elements are not available in version 2 . 1 . Instead the value new_build is used in the &lt ; price_freq&gt ; element . <p > Any occurrences of &lt ; price_freq&gt ; new_build&lt ; / price_freq&gt ; is replaced by &lt ; price_freq&gt ; sale&lt ; / price_freq&gt ; and &lt ; new_build&gt ; 1&lt ; / new_build&gt ; is added to the property .