Java代码从XSD创建XML文件,没有任何POJO

问题描述:

我只想在不使用任何POJO的情况下仅使用XSD创建XML文件。我试图搜索解决方案,但大多数使用JAXB,这些都依赖于Classes和Marshaling。我想用XSD创建一个XML文件,我们不需要任何其他依赖项。

I just want to create XML file by only using XSD without using any POJO. I tried to search solutions, but most of them using JAXB those are dependent on Classes and Marshaling. I feel like to create an XML file with XSD we don't require any other dependencies.

我使用jlib为这个问题找到了最简单的解决方案。

I got the simplest solution for this problem using jlib.

https://github.com /elbuo8/Sample-XSD-to-XML-Batch-Generator/blob/master/Runner.java