JAXB XJC file generation - how to change the namespace

1.8k Views Asked by At

so I am using a binding.xjb file to generate classes from XML files. My main problems is that every XML file begins like this:

 <xs:schema xmlns="http://www.kfk.de/bokes" xmlns:xs="http://www.w3.org
/2001/XMLSchema" targetNamespace="http://www.kfk.de/bokes"
elementFormDefault="qualified" attributeFormDefault="unqualified">

And the generated package-info.java - <xs:schema xmlns="http://www.kfk.de/bokes" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.kfk.de/bokes" elementFormDefault="qualified" attributeFormDefault="unqualified">

However I don't want to have the targetNamespace to be http://www.kfk.de/bokes, I want to change it to "bokes" only but I still can't understand how to change it in the bindings.xjb I tried using:

       <jxb:bindings>
          <namespace:prefix name="bokes"/>
       </jxb:bindings>

but it didn't work

0

There are 0 best solutions below