Generating XML from XSD

If you have XSD or you are modyfiyng XSD and want to see generated example of XML you have several options to use.

I know that SpyXML (Altova) has that posibility same as Oxygenxml , but this is commercial software (didn’t test it).

I have found out that eclipse J2EE version which includes WTP (web tools platform) has that posibility and it is free.

Here is small tutorial generating XML from XSD how to do that, but in basic you need to do this:

  • download Eclipse IDE for Java EE Developers (this includes WTP plugins)
  • create new project (you can use example which comes with eclipse: File>New>Examples>XML>Editing and validating XML files)
  • to generate XML from XSD/DTD,… you need to follow these steps:
    • Run New XML File wizard  – File>New>Other>XML>XML
    • select project name and you can change xml file name -> Next
    • if you want to test XSD then next step is to select Create XML file from an XML Schema file and select the xsd file from project (or import it to to the project)
    • Next step is to select check box if you want to add some default attributes
    • at the last step you will be see the resulted XML file

 

Advertisements


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s