private static String writeNode(Properties objectProperties, int depth){
        StringBuilder builder = new StringBuilder();
        for(Map.Entry<Object, Object> entry : objectProperties.entrySet()){
            Object key = entry.getKey();
            Object value = entry.getValue();
            if(value instanceof ArrayList){
//                System.err.println(value);
                ArrayList list = (ArrayList)value;
                for (Object object : list) {
                    for(int i=0;i<depth;i++) builder.append("  ");
                    builder.append("  <" + list.get(0).getClass().getSimpleName() + ">\n");
                    BusinessObject businessObject = (BusinessObject) object;
                    builder.append(writeNode(businessObject.getOutputProperties(), depth + 1));
                    for(int i=0;i<depth;i++) builder.append("  ");
                    builder.append("  </" + list.get(0).getClass().getSimpleName() + ">\n");
                }
            } else{
                if(value!=null && !"".equals(value)){
                    for(int i=0;i<depth;i++) builder.append("  ");
                    builder.append("  <" + key + ">" + value + "</"+ key + ">\n");
                }
            }
        }
        return builder.toString();
    }