JAXB / XJC: Differentiate between objects for elements with same complexType
I have the following :
JAXB dynamic namespace prefix
I want to dynamically assign prefix e.g. either “ns2” or “Saa” or no prefix at all depending on certain condition. It seems that the NamespacePrefixMapper class can not be used anymore. If I define Xmlns prefix in package-info.java, how do I dynamically based on a condition assign prefix ns2 or Saa or blank for that matter?
Get values from XML file
I have the following custom XML file which I want to read using Java and JAXB: