I'm generating some XML with Jaxb that looks pretty good. Here's a snipit:
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<ns2:oval_system_characteristics xsi:schemaLocation="http://oval.mitre.org/XMLSchema/oval-system-characteristics-5 oval-system-characteristics-schema.xsd http://oval.mitre.org/XMLSchema/oval-common-5 oval-common-schema.xsd http://oval.mitre.org/XMLSchema/oval-system-characteristics-5#esx esx-system-characteristics-schema.xsd"
xmlns:ns2="http://oval.mitre.org/XMLSchema/oval-system-characteristics-5" xmlns="http://oval.mitre.org/XMLSchema/oval-common-5" xmlns:ns3="http://oval.mitre.org/XMLSchema/oval-system-characteristics-5#esx" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
...
<ns3:visdkmanagedobject_item id="1">
<ns3:property>isolation.tools.diskWiper.disable</ns3:property>
<ns3:value datatype="boolean">true</ns3:value>
</ns3:visdkmanagedobject_item>
This is standards compliant XML. Unfortunately the I'm limited by the constraints of the downstream system, it only accepts XML formatted this way:
<visdkmanagedobject_item id="1" xmlns="http://oval.mitre.org/XMLSchema/oval-system-characteristics-5#esx">
<property>isolation.tools.diskWiper.disable</property>
<value datatype="boolean">true</value>
</visdkmanagedobject_item>
Where certain elements are namespaced through the xmlns attribute. Now for the question, how do I get Jaxb to stop (doing the right thing) namespacing the elements with a prefix and start namespacing the elements with the xmlns attribute?