Namespace Auto-Completion

Namespace auto-completion.

On typing the '=' character after the xmlns attribute a list of namespaces will be shown.

Element Auto-Completion

Element auto-completion.

On typing the opening tag a list of elements that can be added at the current location will be displayed.

Attribute Auto-Completion

Attribute auto-completion.

On typing a space character after an element name a list of attributes for that element will be shown.

Attribute Value Auto-Completion

Attribute value auto-completion.

On typing the first character of the attribute value a list of possible values, as inferred from the schema, are displayed.

Schema Annotation

Schema Annotation.

If the schema contains any annotation text then this will be displayed.

XML Validation

XML Validation against a schema.

To validate an xml document, first associate a namespace with it using the xmlns attribute, then select the menu option XML | Validate. Errors will be shown in the output window and the task list. Clicking an entry in the task list will move the cursor to the position of the error.

Configuring Schemas

Options dialog to configure schemas.

The XML schemas that MonoDevelop is aware of can be viewed by selecting XML Editor | XML Schemas in the MonoDevelop preferences dialog.

In the "Schemas" group box, schemas that have been added by the user are highlighted in black text. System schemas, those that are installed with the MonoDevelop XML Editor, are displayed in grey text. Only user added schemas can be added or removed. Clicking the "Add" button opens up the "Open file" dialog allowing the user to browse to an .xsd file and add it.

The "File Extensions" group box shows default associations between an file extension and a schema. For example, ".build" files could be associated with a nant schema, then whenever a .build file is opened it automatically gets auto-completion for that schema without the need to specify a "xmlns" attribute. A xmlns attribute specified in the xml will override the default schema association. To associate a schema with an xml file extension click the browse button and select a schema from the list.

The "Prefix" text box is used to specify the default namespace prefix associated with an xml element. This prefix will be used in the autocompletion list (eg. "xs:schema").