} else if (object instanceof Collection) {
result = processCollection((Collection)object);
} else if (object instanceof Map) {
result = processMap((Map)object);
} else if (object instanceof Number) {
result = new XmlObject("number", (Number)object);
} else if (object instanceof String) {
result = object;
} else {
result = new XmlObject(object.getClass().getSimpleName(), object);
}
return result;
}