I need to export data using JAXB into XML. A 3rd party application, that needs to import the file can't handle namespace prefixes, no idea why but they keep insisting that there's no workaround possible on their side.
My question is now, is there any way to remove them prefixes from, most important, the root element, and if possible from the attributes of the subelements? See example below
Have you considered the possibility that they can't process your document because it is not well-formed? It has namespace prefixes without a corresponding namespace declaration.
If the answer is that you posted an incomplete version of the document and your real document is well-formed, then I would suggest doing an XSL transformation to produce a similar document without namespaces.
Joined: Jun 24, 2010
Yes, what i did in the first place was to run a namespace-filter, that removed the namepace attribute from the root element, resulting in every attibute of the sub-elements having a prefix 'ns1'.... and it's not well-formed anymore of course... DARN!