## XML Support

### Loading XML documents

Amaya can display any well formed XML document and associate a CSS stylesheet with these documents.

For an XML document that refers to a not-supported DTD or namespace (different from XHTML, MathML and SVG), Amaya offers a limited support for the display and for the edition. Indeed, as Amaya doesn't analyse the associated DTD, it can't verify the validity of any XML document and can't get specific information about elements and attributes and about their organization within the document.

### Using Style in XML

If the document is associated to a DTD that Amaya does not understand, the content of the document will be formatted and displayed in a way that reflects the structure of the document. If there is no style indication, the content of each element will be shown as a block. However, for clarity, the elements that have at least one child of type "Text" are considered to be of type inline and displayed accordingly. Amaya can use associate a CSS style sheet. You can also modify the presentation of the document if you associate a CSS style sheet to it by means of a xml-stylesheet PI (processing instruction) statement.

### Editing XML documents

The edition of generic XML documents in Amaya is still experimental. For the supported samples (XHTML, SVG, MathML), the edition follows the same rules as for the corresponding document type. For the other elements, only the Return command is available in this version :

- If the selection is within an element, Amaya cuts the selected element and creates a new element with the same type next to it.
- If a whole non-empty element is selected, Amaya creates a new element with the same type next to the selected element.
- If a whole empty element is selected, Amaya creates a sibling with the same type for the parent of the selected element.

You can also edit your XML documents in the Source View and use the Resynchronize command. Your modifications are then reported in the Formatted view.