Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Use Netbeans to Create Sample XML from XSD

Tags:

xml

netbeans

xsd

How do you use Netbeans to generate a sample XML file from an XSD? I see that this question has been asked before and it would appear that it can be done. Though, there are some reports that make it seem it cannot.

What menu or window is the option located under? I have looked under every menu as well as searched the plugins. My version of Netbeans: NetBeans IDE 7.0.1 (Build 201107282000)

like image 1000
Josh Johnson Avatar asked Oct 18 '11 18:10

Josh Johnson


People also ask

Can we generate XML from XSD?

We can use Eclipse IDE to easily generate XML from the XSD file. 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.


1 Answers

From a project that contains the .xsd:

  1. Click New File on the tool bar or File > New File from the menu
  2. Choose XML > XML Document
  3. Name your file, click next
  4. Choose XML Schema-Constrained Document, click next
  5. Click the Browse button and use By File to navigate to the .xsd
  6. Click the Import check box beside the file name, click next
  7. Review the options available and click Finish to generate

You can use more than one .xsd file to generate the .xml. In this case it will use whichever .xsd file you choose as Primary to resolve any conflicts.

like image 169
Jonathan Spooner Avatar answered Sep 27 '22 23:09

Jonathan Spooner