Examples/src/main/java/org/openestate/io/examples/ImmoXmlReadingExample.java
@SuppressWarnings("Duplicates")
    protected static void printToConsole(ImmoXmlDocument doc) throws JAXBException {
        LOGGER.info("> process document in version "
                + doc.getDocumentVersion());

        Immoxml immoxml = doc.toObject();

        // process agencies in the document
        for (Anbieter anbieter : immoxml.getAnbieter()) {
            LOGGER.info(">> found agency '" + anbieter.getAnbieternr() + "'");

            // process real estates of the agency
            for (Immobilie immobilie : anbieter.getImmobilie()) {
                // get object nr
                String objectNr = (immobilie.getVerwaltungTechn() != null) ?
                        immobilie.getVerwaltungTechn().getObjektnrIntern() : "???";

                // get object title
                String objectTitle = (immobilie.getFreitexte() != null) ?
                        immobilie.getFreitexte().getObjekttitel() : "???";

                // print object information to console
                LOGGER.info(">>> found object '" + objectNr + "' "
                        + "with title '" + objectTitle + "'");
            }
        }
    }
@SuppressWarnings("Duplicates")
    protected static void printToConsole(ImmoXmlDocument doc) throws JAXBException {
        LOGGER.info("> process document in version "
                + doc.getDocumentVersion());

        Immoxml immoxml = doc.toObject();

        // process agencies in the document
        for (Anbieter anbieter : immoxml.getAnbieter()) {
            LOGGER.info(">> found agency '" + anbieter.getAnbieternr() + "'");

            // process real estates of the agency
            for (Immobilie immobilie : anbieter.getImmobilie()) {
                // get object nr
                String objectNr = (immobilie.getVerwaltungTechn() != null) ?
                        immobilie.getVerwaltungTechn().getObjektnrIntern() : "???";

                // get object title
                String objectTitle = (immobilie.getFreitexte() != null) ?
                        immobilie.getFreitexte().getObjekttitel() : "???";

                // print object information to console
                LOGGER.info(">>> found object '" + objectNr + "' "
                        + "with title '" + objectTitle + "'");
            }
        }
    }
@ SuppressWarnings ( "Duplicates" ) protected static void printToConsole ( ImmoXmlDocument doc ) throws JAXBException { LOGGER . info ( "> process document in version " + doc . getDocumentVersion ( ) ) ; Immoxml immoxml = doc . toObject ( ) ; // process agencies in the document for ( Anbieter anbieter : immoxml . getAnbieter ( ) ) { LOGGER . info ( ">> found agency '" + anbieter . getAnbieternr ( ) + "'" ) ; // process real estates of the agency for ( Immobilie immobilie : anbieter . getImmobilie ( ) ) { // get object nr String objectNr = ( immobilie . getVerwaltungTechn ( ) != null ) ? immobilie . getVerwaltungTechn ( ) . getObjektnrIntern ( ) : "???" ; // get object title String objectTitle = ( immobilie . getFreitexte ( ) != null ) ? immobilie . getFreitexte ( ) . getObjekttitel ( ) : "???" ; // print object information to console LOGGER . info ( ">>> found object '" + objectNr + "' " + "with title '" + objectTitle + "'" ) ; } } }
Print some content of an {@link ImmoXmlDocument} to console.

@param doc the document to process
@throws JAXBException if XML conversion into Java objects failed
Print some content of an { @link ImmoXmlDocument } to console .