Name

rng:text — Matches textual content in elements or attributes

XML syntax example

<element name="description">
 <attribute name="type"><text/></attribute>
 <text/>
</element>

Compact syntax example

element description { attribute type { text }, text }

Parents

attribute, choice (( ) and |), define (name of pattern followed by =), element, except (-), group (( ) and ,), interleave (&), list, mixed, oneOrMore (+), optional (?), start (start followed by =), zeroOrMore (*)

Description

The text pattern matches textual content in elements or attributes. It can match any amount of text (i.e., any number of text nodes), including none at all; hence text, text?, text*, and text+ all mean the same thing.

See also

§1, data, param, value

Get XML Pocket Reference, 3rd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.