Kyero/src/main/java/org/openestate/io/kyero/KyeroDocument.java
public static KyeroDocument newDocument(Root root) throws ParserConfigurationException, JAXBException {
        if (root.getKyero() == null)
            root.setKyero(KyeroUtils.getFactory().createKyeroType());
        if (StringUtils.isBlank(root.getKyero().getFeedVersion()))
            root.getKyero().setFeedVersion(KyeroUtils.VERSION.toXmlVersion());

        Document document = XmlUtils.newDocument();
        KyeroUtils.createMarshaller("UTF-8", true).marshal(root, document);
        return new KyeroDocument(document);
    }
public static KyeroDocument newDocument(Root root) throws ParserConfigurationException, JAXBException {
        if (root.getKyero() == null)
            root.setKyero(KyeroUtils.getFactory().createKyeroType());
        if (StringUtils.isBlank(root.getKyero().getFeedVersion()))
            root.getKyero().setFeedVersion(KyeroUtils.VERSION.toXmlVersion());

        Document document = XmlUtils.newDocument();
        KyeroUtils.createMarshaller("UTF-8", true).marshal(root, document);
        return new KyeroDocument(document);
    }
public static KyeroDocument newDocument ( Root root ) throws ParserConfigurationException , JAXBException { if ( root . getKyero ( ) == null ) root . setKyero ( KyeroUtils . getFactory ( ) . createKyeroType ( ) ) ; if ( StringUtils . isBlank ( root . getKyero ( ) . getFeedVersion ( ) ) ) root . getKyero ( ) . setFeedVersion ( KyeroUtils . VERSION . toXmlVersion ( ) ) ; Document document = XmlUtils . newDocument ( ) ; KyeroUtils . createMarshaller ( "UTF-8" , true ) . marshal ( root , document ) ; return new KyeroDocument ( document ) ; }
Creates a {@link KyeroDocument} from a {@link Root} object.

@param root Java object, that represents the &lt;root&gt; root element
@return created document
@throws ParserConfigurationException if the parser is not properly configured
@throws JAXBException                if a problem with JAXB occurred
Creates a { @link KyeroDocument } from a { @link Root } object .