xsd - JAXB Binding file: How to rename the first element of a node? -


i trying generate java classes xsd file xjc.

in xsd file, there like:

<xs:complextype name="somenode">   <xs:sequence>     <xs:element name="foo" minoccurs="0"/>     <xs:element name="bar" minoccurs="0"/>      <xs:element name="baz" minoccurs="0"/>     <xs:element name="bar" minoccurs="0"/>   </xs:sequence> </xs:complextype> 

xjc can't parse correctly xml files, because there 2 non-consecutive bar elements (ie. getbar() ambiguous). need rename first bar element in somenode binding file. this:

<bindings node="//xs:complextype[@name='somenode']">     <!-- here need first element -->     <bindings node="//xs:complextype[@name='bar']">         <class name="firstbar"/>     </bindings> </bindings> 

how first element of node in binding file?


Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -