Examples/src/main/java/org/openestate/io/examples/Is24XmlWritingExample.java
@SuppressWarnings("Duplicates")
    public static void main(String[] args) {
        // init logging
        PropertyConfigurator.configure(
                Is24XmlWritingExample.class.getResource(PACKAGE + "/log4j.properties"));

        // create a ImmobilienTransferTyp object with some example data
        // this object corresponds to the <IS24ImmobilienTransfer> root element in XML
        ImmobilienTransferTyp transfer = FACTORY.createImmobilienTransferTyp();
        transfer.setEmailBeiFehler("test@test.org");
        transfer.setErstellerSoftware("OpenEstate-IO");
        transfer.setErstellerSoftwareVersion("1.4");
        transfer.setAnbieter(createAnbieter());

        // convert the ImmobilienTransferTyp object into a XML document
        Is24XmlDocument doc = null;
        try {
            doc = Is24XmlDocument.newDocument(transfer);
        } catch (Exception ex) {
            LOGGER.error("Can't create XML document!");
            LOGGER.error("> " + ex.getLocalizedMessage(), ex);
            System.exit(1);
        }

        // write XML document into a java.io.File
        try {
            write(doc, File.createTempFile("output-", ".xml"));
        } catch (IOException ex) {
            LOGGER.error("Can't create temporary file!");
            LOGGER.error("> " + ex.getLocalizedMessage(), ex);
            System.exit(1);
        }

        // write XML document into a java.io.OutputStream
        write(doc, new NullOutputStream());

        // write XML document into a java.io.Writer
        write(doc, new NullWriter());

        // write XML document into a string and send it to the console
        writeToConsole(doc);
    }
@SuppressWarnings("Duplicates")
    public static void main(String[] args) {
        // init logging
        PropertyConfigurator.configure(
                Is24XmlWritingExample.class.getResource(PACKAGE + "/log4j.properties"));

        // create a ImmobilienTransferTyp object with some example data
        // this object corresponds to the <IS24ImmobilienTransfer> root element in XML
        ImmobilienTransferTyp transfer = FACTORY.createImmobilienTransferTyp();
        transfer.setEmailBeiFehler("test@test.org");
        transfer.setErstellerSoftware("OpenEstate-IO");
        transfer.setErstellerSoftwareVersion("1.4");
        transfer.setAnbieter(createAnbieter());

        // convert the ImmobilienTransferTyp object into a XML document
        Is24XmlDocument doc = null;
        try {
            doc = Is24XmlDocument.newDocument(transfer);
        } catch (Exception ex) {
            LOGGER.error("Can't create XML document!");
            LOGGER.error("> " + ex.getLocalizedMessage(), ex);
            System.exit(1);
        }

        // write XML document into a java.io.File
        try {
            write(doc, File.createTempFile("output-", ".xml"));
        } catch (IOException ex) {
            LOGGER.error("Can't create temporary file!");
            LOGGER.error("> " + ex.getLocalizedMessage(), ex);
            System.exit(1);
        }

        // write XML document into a java.io.OutputStream
        write(doc, new NullOutputStream());

        // write XML document into a java.io.Writer
        write(doc, new NullWriter());

        // write XML document into a string and send it to the console
        writeToConsole(doc);
    }
Start the example application.

@param args command line arguments