List of usage examples for org.w3c.dom Element removeAttribute
public void removeAttribute(String name) throws DOMException;
From source file:org.openestate.io.openimmo.converters.OpenImmo_1_2_3.java
/** * Downgrade <bad> elements to OpenImmo 1.2.2. * <p>/*from w ww . j a v a2 s . c o m*/ * The attributes "BIDET", "PISSOIR" for <bad> elements are not * available in version 1.2.2. * <p> * Any occurences of these values are removed. * * @param doc OpenImmo document in version 1.2.3 * @throws JaxenException */ protected void downgradeBadElements(Document doc) throws JaxenException { List nodes = XmlUtils .newXPath("/io:openimmo/io:anbieter/io:immobilie/io:ausstattung/io:bad[@BIDET or @PISSOIR]", doc) .selectNodes(doc); for (Object item : nodes) { Element node = (Element) item; node.removeAttribute("BIDET"); node.removeAttribute("PISSOIR"); } }
From source file:org.openestate.io.openimmo.converters.OpenImmo_1_2_3.java
/** * Downgrade <befeuerung> elements to OpenImmo 1.2.2. * <p>/*from w w w .ja v a 2s .com*/ * The attribute "PELLET" for <befeuerung> elements is not available in * version 1.2.2. * <p> * Any occurences of these values are removed. * * @param doc OpenImmo document in version 1.2.3 * @throws JaxenException */ protected void downgradeBefeuerungElements(Document doc) throws JaxenException { List nodes = XmlUtils .newXPath("/io:openimmo/io:anbieter/io:immobilie/io:ausstattung/io:befeuerung[@PELLET]", doc) .selectNodes(doc); for (Object item : nodes) { Element node = (Element) item; node.removeAttribute("PELLET"); } }
From source file:org.openestate.io.openimmo.converters.OpenImmo_1_2_3.java
/** * Downgrade <boden> elements to OpenImmo 1.2.2. * <p>/*w w w. ja v a2 s . co m*/ * The attributes "MARMOR", "TERRAKOTTA" for <boden> elements are not * available in version 1.2.2. * <p> * Any occurences of these values are removed. * * @param doc OpenImmo document in version 1.2.3 * @throws JaxenException */ protected void downgradeBodenElements(Document doc) throws JaxenException { List nodes = XmlUtils .newXPath("/io:openimmo/io:anbieter/io:immobilie/io:ausstattung/io:boden[@MARMOR or @TERRAKOTTA]", doc) .selectNodes(doc); for (Object item : nodes) { Element node = (Element) item; node.removeAttribute("MARMOR"); node.removeAttribute("TERRAKOTTA"); } }
From source file:org.openestate.io.openimmo.converters.OpenImmo_1_2_3.java
/** * Downgrade <dachform> elements to OpenImmo 1.2.2. * <p>//w ww .j av a 2 s .c om * The attributes "FLACHDACH", "PYRAMIDENDACH" for <dachform> elements * are not available in version 1.2.2. * <p> * Any occurences of these values are removed. * * @param doc OpenImmo document in version 1.2.3 * @throws JaxenException */ protected void downgradeDachformElements(Document doc) throws JaxenException { List nodes = XmlUtils.newXPath( "/io:openimmo/io:anbieter/io:immobilie/io:ausstattung/io:dachform[@FLACHDACH or @PYRAMIDENDACH]", doc).selectNodes(doc); for (Object item : nodes) { Element node = (Element) item; node.removeAttribute("FLACHDACH"); node.removeAttribute("PYRAMIDENDACH"); } }
From source file:org.openestate.io.openimmo.converters.OpenImmo_1_2_3.java
/** * Downgrade <kueche> elements to OpenImmo 1.2.2. * <p>/* w w w .j av a 2 s.c o m*/ * The attribute "PANTRY" for <kueche> elements is not available in * version 1.2.2. * <p> * Any occurences of these values are removed. * * @param doc OpenImmo document in version 1.2.3 * @throws JaxenException */ protected void downgradeKuecheElements(Document doc) throws JaxenException { List nodes = XmlUtils .newXPath("/io:openimmo/io:anbieter/io:immobilie/io:ausstattung/io:kueche[@PANTRY]", doc) .selectNodes(doc); for (Object item : nodes) { Element node = (Element) item; node.removeAttribute("PANTRY"); } }
From source file:org.openestate.io.openimmo.converters.OpenImmo_1_2_4.java
/** * Downgrade <anhang> elements to OpenImmo 1.2.3. * <p>//from ww w. j a v a2 s .c om * The options "QRCODE", "FILM", "FILMLINK" for the "gruppe" attribute of * <anhang> elements are not available in version 1.2.3. * <p> * The option "REMOTE" for the "location" attribute of * <anhang> elements is not available in version 1.2.3. * <p> * The the child element <check> of <anhang> elements is not * available in version 1.2.3. * * @param doc OpenImmo document in version 1.2.4 * @throws JaxenException */ protected void downgradeAnhangElements(Document doc) throws JaxenException { List nodes = XmlUtils.newXPath("/io:openimmo/io:anbieter/io:anhang | " + "/io:openimmo/io:anbieter/io:immobilie/io:anhaenge/io:anhang", doc).selectNodes(doc); for (Object item : nodes) { Element node = (Element) item; String value = StringUtils.trimToNull(node.getAttribute("gruppe")); if ("QRCODE".equalsIgnoreCase(value)) node.removeAttribute("gruppe"); else if ("FILM".equalsIgnoreCase(value)) node.removeAttribute("gruppe"); else if ("FILMLINK".equalsIgnoreCase(value)) node.removeAttribute("gruppe"); value = StringUtils.trimToNull(node.getAttribute("location")); if ("REMOTE".equalsIgnoreCase(value)) node.setAttribute("location", "EXTERN"); List childNodes = XmlUtils.newXPath("io:check", doc).selectNodes(node); for (Object childItem : childNodes) { node.removeChild((Node) childItem); } } }
From source file:org.openestate.io.openimmo.converters.OpenImmo_1_2_4.java
/** * Downgrade <bebaubar_nach> elements to OpenImmo 1.2.3. * <p>//from w w w.j a va2s . c o m * The option "LAENDERSPEZIFISCH" for the "bebaubar_attr" attribute of * <bebaubar_nach> elements is not available in version 1.2.3. * <p> * Any occurences of these values are removed. * * @param doc OpenImmo document in version 1.2.4 * @throws JaxenException */ protected void downgradeBebaubarNachElements(Document doc) throws JaxenException { List nodes = XmlUtils.newXPath( "/io:openimmo/io:anbieter/io:immobilie/io:zustand_angaben/io:bebaubar_nach[@bebaubar_attr]", doc) .selectNodes(doc); for (Object item : nodes) { Element node = (Element) item; String value = StringUtils.trimToNull(node.getAttribute("bebaubar_attr")); if ("LAENDERSPEZIFISCH".equalsIgnoreCase(value)) node.removeAttribute("bebaubar_attr"); } }
From source file:org.openestate.io.openimmo.converters.OpenImmo_1_2_4.java
/** * Downgrade <energietyp> elements to OpenImmo 1.2.3. * <p>/* ww w . j a v a2 s.co m*/ * The attributes "KFW55", "KFW70" of <energietyp> elements are not * available in OpenImmo 1.2.3. * * @param doc OpenImmo document in version 1.2.4 * @throws JaxenException */ protected void downgradeEnergietypElements(Document doc) throws JaxenException { List nodes = XmlUtils .newXPath("/io:openimmo/io:anbieter/io:immobilie/io:ausstattung/io:energietyp[@KFW55 or @KFW70]", doc) .selectNodes(doc); for (Object item : nodes) { Element node = (Element) item; node.removeAttribute("KFW55"); node.removeAttribute("KFW70"); } }
From source file:org.openestate.io.openimmo.converters.OpenImmo_1_2_4.java
/** * Downgrade <grundstueck> elements to OpenImmo 1.2.3. * <p>// ww w . jav a 2 s . c o m * The option "SEELIEGENSCHAFT" for the "grundst_typ" attribute of * <grundstueck> elements is not available in version 1.2.3. * <p> * Any occurence of these values is removed. * * @param doc OpenImmo document in version 1.2.4 * @throws JaxenException */ protected void downgradeGrundstueckElements(Document doc) throws JaxenException { List nodes = XmlUtils.newXPath( "/io:openimmo/io:anbieter/io:immobilie/io:objektkategorie/io:objektart/io:grundstueck[@grundst_typ]", doc).selectNodes(doc); for (Object item : nodes) { Element node = (Element) item; String value = StringUtils.trimToNull(node.getAttribute("grundst_typ")); if ("SEELIEGENSCHAFT".equalsIgnoreCase(value)) node.removeAttribute("grundst_typ"); } }
From source file:org.openestate.io.openimmo.converters.OpenImmo_1_2_5.java
/** * Downgrade <bebaubar_nach> elements to OpenImmo 1.2.4. * <p>/*from w ww. ja v a 2 s. co m*/ * The option "BAULAND_OHNE_B_PLAN" for the "bebaubar_attr" attribute of * <bebaubar_nach> elements is not available in version 1.2.4. * <p> * Any occurences of these values are removed. * * @param doc OpenImmo document in version 1.2.5 * @throws JaxenException */ protected void downgradeBebaubarNachElements(Document doc) throws JaxenException { List nodes = XmlUtils.newXPath( "/io:openimmo/io:anbieter/io:immobilie/io:zustand_angaben/io:bebaubar_nach[@bebaubar_attr]", doc) .selectNodes(doc); for (Object item : nodes) { Element node = (Element) item; String value = StringUtils.trimToNull(node.getAttribute("bebaubar_attr")); if ("BAULAND_OHNE_B_PLAN".equalsIgnoreCase(value)) node.removeAttribute("bebaubar_attr"); } }