Just follow the below steps to get XML from XSD. Select XSD File in project, right click for Menu and select Generate > XML File… Provide the XML file Name and XML File location in the popup window. Click on next button.
It is possible to create a sample XML document from an XML Schema. This can be done by using the "Tools->Create Sample XML Document" Menu ( ). The sample XML Document is created by stepping though the possible options in the schema and creating the appropriate elements and attributes as it goes.
In Visual Studio 2008 SP1 and later the XML Schema Explorer can create an XML document with some basic sample data:
In recent versions of the free and open source Eclipse IDE you can generate XML documents from DTD and XSD files. Right-click on a given *.dtd or *.xsd file and select "Generate -> XML File...". You can choose which root element to generate and whether optional attributes and elements should be generated.
Of course you can use Eclipse to create and edit your DTD and XSD schema files, too. And you don't need to install any plugins. It is included in the standard distribution.
For Intellij Idea users:
Have a look at Tools -> XML Actions
Seems to work very well (as far as I have tested).
Edit:
As mentioned by @naXa, you can now also right-click on the XSD file and click "Generate XML Document from XSD Schema..."
I think Oxygen (http://www.oxygenxml.com/) does it as well, but that's another commerical product. It's a nice one, though... I'd strongly recommend it for anyone doing a lot of XML work. It comes in a nice Eclipse plugin, too.
I do believe there is a free, fully-featured 30 day trial.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With