简体   繁体   中英

Creating XJC file , jaxb customization file

How to generate .XJC file or jaxb customization file ?

Goggled but could not find any tool. Tried with XML Spy but could not Thanks in advance

This is an xjb example ..

<bindings version="2.0" xmlns="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:annox="http://annox.dev.java.net">
    <bindings schemaLocation="../your.xsd">

            <bindings node="//xs:complexType[@name='YourType']">
                <annox:annotate>
                    <annox:annotate annox:class="javax.xml.bind.annotation.XmlRootElement"
                        name="YourType" namespace="http://name.space.xsd">
                    </annox:annotate>
                </annox:annotate>
            </bindings>

            <bindings node="//xsd:complexType[@name='User']//xsd:sequence//xsd:element[@name='certificate']">
                <xjc:javaType name="java.security.cert.X509Certificate" adapter="adapters.X509CertificateAdapter" />
            </bindings>

    </bindings>
</bindings>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM