我正在使用此代码
JAXBContext jc = JAXBContext.newInstance(Bookdata.class);
Bookdata bookdata=new Bookdata();
Marshaller marshaller = jc.createMarshaller();
marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true);
marshaller.marshal(bookdata, (OutputStream) output);
但它正在生成 XML 但我需要 XSD 我需要像这样创建 XSD:
<ArrayOfCommandInfoDTO>
<CommandInfoDTO>
<a:allowAddingGameCenterFriends>true</a:allowAddingGameCenterFriends>
<a:enter code here>allowAppInstallation>true</a:allowAppInstallation>
<a:allowAssistant>true</a:allowAssistant>
<a:allowAssistantWhileLocked>true</a:allowAssistantWhileLocked>
<a:allowCamera>true</a:allowCamera>
</CommandInfoDTO>
</ArrayOfCommandInfoDTO>
所以请告诉我如何从 java Beans 或 XML 创建 XSD