I need to remove the namespace from an XML using Java (the project also makes use of SAX/JAXB). The example below illustrates what is needed, essentially to transform the input XML into the result XML. Any advice / working example of how this can be achieved?
Input XML:
<ns2:client xmlns:ns2="http://my-org/schemas" instance="1">
<ns2:dob>1969-01-01T00:00:00</ns2:dob>
<ns2:firstname>Anna</ns2:firstname>
<ns2:married>false</ns2:married>
<ns2:gender>Female</ns2:gender>
<ns2:surname>Smith</ns2:surname>
<ns2:title>Miss</ns2:title>
</ns2:client>
Result XML:
<client instance="1">
<dob>1969-01-01T00:00:00</dob>
<firstname>Anna</firstname>
<married>false</married>
<gender>Female</gender>
<surname>Smith</surname>
<title>Miss</title>
</client>