XML Schema import Element
Definition and Usage
The import element is used to add multiple schemas with different target namespaces to a document.
Element Information
- Parent Element: schema
Syntax
(? The question mark indicates that the declaration can appear zero or one time within the import element.)
| Attribute | Description |
|---|---|
| id | Optional. Specifies a unique ID for the element. |
| namespace | Required. Specifies the URI of the namespace to be imported. |
| schemaLocation | Optional. Specifies the URI of the namespace being imported. |
| any attributes | Optional. Specifies any other attributes with non-schema namespaces. |
Example 1
The following example demonstrates importing a namespace: