How to add only the namespaces that are used in the XML to the generated XML using the JAXB/Jakarta Marshaller?
How to ensure the Jakarta/JAXB marshaller adds only the namespaces that have been used in the provided Object which needs to be marshalled? and skip the unwanted namespaces from the generated XML even though they are provided in MAP?