/** * Returns the xml representation of a property related set with the * following format: * <pre> * <!ELEMENT prop (ANY) > * where ANY consists of a list of elements each reflecting the xml * representation of the entries returned by {@link #getContent()}. * </pre> * * @see XmlSerializable#toXml(Document) */ public Element toXml(Document document) { Element prop = DomUtil.createElement(document, XML_PROP, NAMESPACE); Iterator it = getContent().iterator(); while (it.hasNext()) { Object content = it.next(); if (content instanceof XmlSerializable) { prop.appendChild(((XmlSerializable)content).toXml(document)); } else { log.debug("Unexpected content in PropContainer: should be XmlSerializable."); } } return prop; }
/** * Returns the xml representation of a property related set with the * following format: * <pre> * <!ELEMENT prop (ANY) > * where ANY consists of a list of elements each reflecting the xml * representation of the entries returned by {@link #getContent()}. * </pre> * * @see XmlSerializable#toXml(Document) */ public Element toXml(Document document) { Element prop = DomUtil.createElement(document, XML_PROP, NAMESPACE); for (Object content : getContent()) { if (content instanceof XmlSerializable) { prop.appendChild(((XmlSerializable) content).toXml(document)); } else { log.debug("Unexpected content in PropContainer: should be XmlSerializable."); } } return prop; }
/** * Returns the xml representation of a property related set with the * following format: * <pre> * <!ELEMENT prop (ANY) > * where ANY consists of a list of elements each reflecting the xml * representation of the entries returned by {@link #getContent()}. * </pre> * * @see XmlSerializable#toXml(Document) */ public Element toXml(Document document) { Element prop = DomUtil.createElement(document, XML_PROP, NAMESPACE); for (Object content : getContent()) { if (content instanceof XmlSerializable) { prop.appendChild(((XmlSerializable) content).toXml(document)); } else { log.debug("Unexpected content in PropContainer: should be XmlSerializable."); } } return prop; }