큰 XML의 부분 비 정렬 화를 원합니다. XJC 생성JAXB로 부분 정렬 해제
<Records>
<Contract>
...
</Contract>
<Contract>
...
</Contract>
...
<Contract>
...
</Contract>
<Contract>
...
</Contract>
</Records>
그리고 결과 클래스 :
XML은 다음과 같은 구조를 가지고
- Records
|- Contract
내가 these (JAXB 리에서 샘플)을 따른다면, 내가 얻을 오류 :
Exception in thread "main" javax.xml.bind.UnmarshalException: unexpected element (uri:"http://somedomain.com", local:"Contract"). Expected elements are <{http://somedomain.com}Records>
내가 사용하는 경우 :
<jaxb:globalBindings localScoping="toplevel"/>
나는 오류 얻을 :
org.xml.sax.SAXParseException: A class/interface with the same name "com.my.package.Text" is already in use. Use a class customization to resolve this conflict.
을하지만 난 많은 클래스를 변경해야합니다. 그리고 이것은 해결책이 아닙니다.
감사합니다. 완벽하게 작동합니다! – Margaret