Creating an XML document from the XML schema
In this section we shall create an XML document instance, catalog.xml (which was listed in the introduction), from the registered schema catalog.xsd. We're using a registered schema, but it is not essential as it's also possible to create an XML document instance using an XML schema in the file system.
However, using a registered XML schema does have an advantage. You may associate it with a specific file extension. For example, to register an XML schema for generating only .xslt
files you would associate the .xslt
extension with the XML schema.
Select project node XMLSchema in Application Navigator, and select File|New. In the New Gallery window select Categories|General|XML. Select XML Document from XML schema in the Items listed. Click on the OK button.
The Create XML Document from XML schema wizard gets started. Click on the Next button.
In the File Location window specify the XML File name as catalog.xml. Select Use Registered Schemas to...