Function: nxml-forward-balanced-item
nxml-forward-balanced-item is an interactive and byte-compiled
function defined in nxml-mode.el.gz.
Signature
(nxml-forward-balanced-item &optional ARG)
Documentation
Move forward across one balanced item.
With ARG, do it that many times. Negative arg -N means
move backward across N balanced expressions.
This is the equivalent of forward-sexp for XML.
An element is by default treated as a single markup item.
However, if the variable nxml-sexp-element-flag is nil, then an
element contains as items strings with no markup, tags,
processing instructions, comments, CDATA sections, entity
references and character references. A start-tag contains an
element name followed by one or more attributes. An end-tag
contains just an element name. An attribute value literals
contains strings with no markup, entity references and character
references. A processing instruction consists of a target and a
content string. A comment or a CDATA section contains a single
string. An entity reference contains a single name. A character
reference contains a character number.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/nxml/nxml-mode.el.gz
;;; Movement
(defun nxml-forward-balanced-item (&optional arg)
"Move forward across one balanced item.
With ARG, do it that many times. Negative arg -N means
move backward across N balanced expressions.
This is the equivalent of `forward-sexp' for XML.
An element is by default treated as a single markup item.
However, if the variable `nxml-sexp-element-flag' is nil, then an
element contains as items strings with no markup, tags,
processing instructions, comments, CDATA sections, entity
references and character references. A start-tag contains an
element name followed by one or more attributes. An end-tag
contains just an element name. An attribute value literals
contains strings with no markup, entity references and character
references. A processing instruction consists of a target and a
content string. A comment or a CDATA section contains a single
string. An entity reference contains a single name. A character
reference contains a character number."
(interactive "^p")
(or arg (setq arg 1))
(cond ((> arg 0)
(while (progn
(nxml-forward-single-balanced-item)
(> (setq arg (1- arg)) 0))))
((< arg 0)
(while (progn
(nxml-backward-single-balanced-item)
(< (setq arg (1+ arg)) 0))))))