Function: nxml-mode

Major mode for editing XML.

M-x nxml-finish-element finishes the current element by inserting an end-tag.
C-c C-i closes a start-tag with `>' and then inserts a balancing end-tag
leaving point between the start-tag and end-tag.
M-x nxml-balanced-close-start-tag-block is similar but for block rather than inline elements:
the start-tag, point, and end-tag are all left on separate lines.
If `nxml-slash-auto-complete-flag' is non-nil, then inserting a ` automatically inserts the rest of the end-tag.

M-x completion-at-point performs completion on the symbol preceding point.

M-x nxml-dynamic-markup-word uses the contents of the current buffer
to choose a tag to put around the word preceding point.

Sections of the document can be displayed in outline form. The
variable `nxml-section-element-name-regexp' controls when an element
is recognized as a section. The same key sequences that change
visibility in outline mode are used except that they start with C-c C-o
instead of C-c.

Validation is provided by the related minor-mode `rng-validate-mode'.
This also makes completion schema- and context- sensitive. Element
names, attribute names, attribute values and namespace URIs can all be
completed. By default, `rng-validate-mode' is automatically enabled.
You can toggle it using M-x rng-validate-mode or change the default by
customizing `rng-nxml-auto-validate-flag'.

TAB indents the current line appropriately.
This can be customized using the variable `nxml-child-indent'
and the variable `nxml-attribute-indent'.

M-x nxml-insert-named-char inserts a character reference using
the character's name (by default, the Unicode name).
C-u M-x nxml-insert-named-char inserts the character directly.

The Emacs commands that normally operate on balanced expressions will
operate on XML markup items. Thus C-M-f will move forward
across one markup item; C-M-b will move backward across
one markup item; C-M-k will kill the following markup item;
C-M-@ will mark the following markup item. By default, each
tag each treated as a single markup item; to make the complete element
be treated as a single markup item, set the variable
`nxml-sexp-element-flag' to t. For more details, see the function
`nxml-forward-balanced-item'.
M-x nxml-backward-up-element and M-x nxml-down-element move up and down the element structure. Many aspects this mode can be customized using M-x customize-group nxml RET. (fn)