How can I convert a XML file into a XSD file, using java code?
I am looking for an API what I can convert XML files into XSD files.
In my project I am using that API's JDOM and Xerces. And I can edit my attributes and namespace, but I can't transform a xml in xsd. I have no idea to how I can start.
If you want to generate XSD Schema from an Instance XML File. there are many tools:
- inst2xsd :Just download, unzip and play (it requires Java).
- Microsoft XSD tool rquires windows operating system
.Net XML Interference tool requires .net framework
There are other utilities and you can google them.
I had to create an XSD from an XML instance and create JAXB objects to parse the values from these xmls