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:
A new XML schema node ()
appears in the Explorer.
To edit an XML schema:
The schema is displayed in the Source Editor. You cannot edit XML schemas in the XML editor.
To create an XML document that is constrained by an existing XML schema:
![]() |
You can add an XML schema constraint to an existing XML document by referencing the schema in the XML document's root element. |
You can also validate an XML schema against the general grammar constraints for all XML schemas.
To validate an XML schema:
See also | |
---|---|
Validating an XML Document DTD Nodes in the Explorer Changing the Display of XML Nodes Editing an XML Document |