我有一些代码可以从一组带jaxb注释的类生成一个*.xsd文件:
JAXBContext context = //build from set of classes
final DOMResult result = new DOMResult(); //will hold xsd output
context.generateSchema(new SchemaOutputResolver() {
@Override
public Result createOutput(String namespaceUri, String suggestedFileName) throws I
我有一个包含问题结构的XML文件格式:
<question id="q101">
<text>Do you like the color red?</text>
<answer>yes</answer>
<answer>no</answer>
</question>
<question id="q102">
<text>What is your favorite color?</text>
<answer&