JAXB: How should I marshal complex nested data structures?
I’ve solved the problem without XmlAdapter’s. I’ve written JAXB-annotated objects for Map, Map.Entry and Collection. The main idea is inside the method xmlizeNestedStructure(…): Take a look at the code: public final class Adapters { private Adapters() { } public static Class<?>[] getXmlClasses() { return new Class<?>[]{ XMap.class, XEntry.class, XCollection.class, XCount.class }; } public static Object … Read more