2.2.3.31 *TextWithEndElement Records

These records are a simple optimization intended to reduce the size of the document.

XML of the form

 <value>123</value>

can be represented by three records in the following format.

  
 ShortElement(name="value")
 Chars8Text(value="123")
 EndElement

By marking the Text record to indicate that an EndElement follows, the number of records can be reduced.

  
 ShortElement(name="value")
 Chars8TextWithEndElement(value="123")

Any record with the name in the form *TextWithEndElement MUST be interpreted as a sequence of two records: A *Text record followed by an EndElement record.

For example, the Int32TextWithEndElement record is interpreted as an Int32TextRecord followed by an EndElement record and must behave identically.

These records MUST NOT be used inside Attribute records.