java - How to remove propOrder from all XmlType annotations but leave the name attribute as is? - Stack Overflow

admin2025-04-22  2

Can someone help me write a JAXB binding file used by XJC to remove the propOrder attribute from all @XmlType annotations in all generated classes? Here is what I have so far but it doesn't work because it doesn't match any nodes apparently:

<?xml version="1.0" encoding="UTF-8"?>
<jaxb:bindings
    xmlns:jaxb=";
    xmlns:xjc=";
    xmlns:xs=";
    xs:schemaLocation=" .xsd"
    jaxb:version="3.0">
    <jaxb:bindings schemaLocation="myschema.xsd">
        <jaxb:bindings node="xs:schema/xs:complexType">
            <jaxb:class>
                <jaxb:annotation>@XmlType(name="{localPart}")</jaxb:annotation>
                <jaxb:annotation>@XmlType(propOrder={})</jaxb:annotation>
            </jaxb:class>
        </jaxb:bindings>
    </jaxb:bindings>
</jaxb:bindings>
转载请注明原文地址:http://anycun.com/QandA/1745299085a90545.html