Examples/src/main/java/org/openestate/io/examples/Is24XmlReadingExample.java
protected static void printToConsole(Is24XmlDocument doc) throws JAXBException {
        ImmobilienTransferTyp transfer = doc.toObject();

        // process agency in the document
        if (transfer.getAnbieter() != null) {
            // process objects
            for (JAXBElement<? extends ImmobilieBaseTyp> i : transfer.getAnbieter().getImmobilie()) {
                ImmobilieBaseTyp obj = i.getValue();

                // get object nr
                String objectNr = (!StringUtils.isBlank(obj.getAnbieterObjektID())) ?
                        obj.getAnbieterObjektID().trim() : "???";

                // get object title
                String objectTitle = (!StringUtils.isBlank(obj.getUeberschrift())) ?
                        obj.getUeberschrift().trim() : "???";

                // print object information to console
                LOGGER.info("> found object '" + objectNr + "' "
                        + "with title '" + objectTitle + "'");
            }

            // process virtual objects
            for (JAXBElement<? extends VirtuelleImmobilieBaseTyp> i : transfer.getAnbieter().getVirtuelleImmobilie()) {
                VirtuelleImmobilieBaseTyp obj = i.getValue();

                // get object nr
                String objectNr = (!StringUtils.isBlank(obj.getAnbieterObjektID())) ?
                        obj.getAnbieterObjektID().trim() : "???";

                // get object title
                String objectTitle = (!StringUtils.isBlank(obj.getUeberschrift())) ?
                        obj.getUeberschrift().trim() : "???";

                // print object information to console
                LOGGER.info("> found virtual object '" + objectNr + "' "
                        + "with title '" + objectTitle + "'");
            }
        }
    }
protected static void printToConsole(Is24XmlDocument doc) throws JAXBException {
        ImmobilienTransferTyp transfer = doc.toObject();

        // process agency in the document
        if (transfer.getAnbieter() != null) {
            // process objects
            for (JAXBElement<? extends ImmobilieBaseTyp> i : transfer.getAnbieter().getImmobilie()) {
                ImmobilieBaseTyp obj = i.getValue();

                // get object nr
                String objectNr = (!StringUtils.isBlank(obj.getAnbieterObjektID())) ?
                        obj.getAnbieterObjektID().trim() : "???";

                // get object title
                String objectTitle = (!StringUtils.isBlank(obj.getUeberschrift())) ?
                        obj.getUeberschrift().trim() : "???";

                // print object information to console
                LOGGER.info("> found object '" + objectNr + "' "
                        + "with title '" + objectTitle + "'");
            }

            // process virtual objects
            for (JAXBElement<? extends VirtuelleImmobilieBaseTyp> i : transfer.getAnbieter().getVirtuelleImmobilie()) {
                VirtuelleImmobilieBaseTyp obj = i.getValue();

                // get object nr
                String objectNr = (!StringUtils.isBlank(obj.getAnbieterObjektID())) ?
                        obj.getAnbieterObjektID().trim() : "???";

                // get object title
                String objectTitle = (!StringUtils.isBlank(obj.getUeberschrift())) ?
                        obj.getUeberschrift().trim() : "???";

                // print object information to console
                LOGGER.info("> found virtual object '" + objectNr + "' "
                        + "with title '" + objectTitle + "'");
            }
        }
    }
Print some content of an {@link Is24XmlDocument} to console.

@param doc the document to process
@throws JAXBException if XML conversion into Java objects failed