Working With XML Schemas

See Also 

Like DTDs, XML schemas specify the valid grammar of an XML document. Schemas have several advantages over DTDs, such as better extensibility, support of namespaces and data types, and an XML code base. In the IDE, you can create XML schemas and edit them in the Source Editor. You can also use schemas as XML document constraints and validate your XML documents against them.

To create an XML schema:

  1. From the main window, choose File > New File.
  2. Expand the XML folder and select XML Schema.
  3. Specify a name and location for the file and click Finish.

    A new XML schema node (XML shcema node icon) is created in the Files window.

To edit an XML schema:

  1. Right-click the XML schema node in the Files window.
  2. Choose Edit from the pop-up menu.

    The schema is displayed in the Source Editor.

To validate an XML schema:

  1. Right-click the schema in the Files window.
  2. Choose Validate XML Schema.

To reference an XML schema in an XML document:

     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
     xsi:schemaLocation= "schema location"
See Also
Validating an XML Document
Editing an XML Document
Creating a DTD
About XML Schema Tools

Legal Notices