使用JAXB从XSD生成可编辑的HTML

时间:2019-07-16 23:13:28

标签: java xml xsd jaxb

我有这段代码可以从我的html Java Bean生成xml。该代码还可用于直接从XML模式文件(html)生成xsd文件。问题是生成的html文件不可编辑。

表示禁用复选框,并且DIV元素没有输入框和其他UI元素。在使用JAXB生成可编辑html表单的过程中,我错过了什么?

MyPojo myPojo = new MyPojo();

JAXBContext context = JAXBContext.newInstance(MyPojo.class);
JAXBSource source = new JAXBSource(context, myPojo);

TransformerFactory factory = TransformerFactory.newInstance();

Transformer transformer = factory.newTransformer(new StreamSource(new File("my.xsl")));


StreamResult output = new StreamResult(System.out);
transformer.transform(source, output);

谢谢

0 个答案:

没有答案
相关问题