JAXB unmarshalling based on sibling elements
I have the following xml fragment (which is outside of my control): <item> <name>Name</name> <category>1</category> <subcategory>2</subcategory> </item> I'd like <subcategory> to be unmarshalled to a class that looks like this: public class SubCategory { private Category parent; private int code; private String name; p...