CasaIT/src/main/java/org/openestate/io/casa_it/CasaItDocument.java
public static CasaItDocument newDocument(Container container) throws ParserConfigurationException, JAXBException {
        Document document = XmlUtils.newDocument();
        CasaItUtils.createMarshaller("UTF-8", true).marshal(container, document);
        return new CasaItDocument(document);
    }
public static CasaItDocument newDocument(Container container) throws ParserConfigurationException, JAXBException {
        Document document = XmlUtils.newDocument();
        CasaItUtils.createMarshaller("UTF-8", true).marshal(container, document);
        return new CasaItDocument(document);
    }
Creates a {@link CasaItDocument} from a {@link Container} object.

@param container Java object, that represents the &lt;container&gt; root element
@return created document
@throws ParserConfigurationException if the parser is not properly configured
@throws JAXBException                if a problem with JAXB occurred