type

XText

src @Js
class XText : XNode

XText represents the character data inside an element.

constructors

make

Construct a text node with the specified value.

fields

cdata

If true then this text node was read/will be written as a CDATA section.

val

Character data for this text node.

methods

copy

Make a copy of this text node.

nodeType

Return the XNodeType.text.

toStr

Return the string value (truncated if it is long).

write

Write this node to the output stream.

Slot Details

cdata

src Bool cdata

If true then this text node was read/will be written as a CDATA section. If set to true, then val must not contain the "]]>" substring.

copy

src This copy()

Make a copy of this text node.

make

src new make(Str val)

Construct a text node with the specified value.

nodeType

src virtual override XNodeType nodeType()

Return the XNodeType.text.

toStr

src virtual override Str toStr()

Return the string value (truncated if it is long).

val

src Str val

Character data for this text node. If this text is to be written as a CDATA section, then this value must not contain the "]]>" substring.

write

src virtual override Void write(OutStream out)

Write this node to the output stream. If this node is set to be written as a CDATA section and the val string contains the "]]>" substring then throw IOErr.