Skip to content

Instantly share code, notes, and snippets.

@nazartm
Created February 22, 2013 16:09
Show Gist options
  • Save nazartm/5014497 to your computer and use it in GitHub Desktop.
Save nazartm/5014497 to your computer and use it in GitHub Desktop.
JAXB binding file for prefixing and suffixing generated classes and putting them under a specific package.
<jaxb:bindings xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/jaxb http://java.sun.com/xml/ns/jaxb/bindingschema_2_0.xsd"
version="2.1" jaxb:extensionBindingPrefixes="xjc">
<jaxb:bindings schemaLocation="../schema/dto.xsd" node="/xs:schema">
<jaxb:schemaBindings>
<jaxb:package name="com.annagurban.nazar.dto.v1"/>
<jaxb:nameXmlTransform>
<jaxb:elementName prefix="My" suffix="Dto"/>
<jaxb:typeName prefix="My" suffix="Dto"/>
</jaxb:nameXmlTransform>
</jaxb:schemaBindings>
</jaxb:bindings>
</jaxb:bindings>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment