Name
Text — Inherits CharacterData
Synopsis
The Text method
represents textual data within an Element or Attribute. Text nodes are created for all
chunks of text outside of regular markup within an XML document. The
normalize method merges adjacent
Text nodes into a single node for
each chunk of Text. The methods
of the CharacterData interface
can be used on this object to gain access and manipulation of the
text data.
splitText(offset)This method splits the node into two nodes at the point
offset. All of the data in the node prior to theoffsetremain as a node. The data after the offset becomes part of a new, adjacentTextnode, which is returned to the caller.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access