class

XText

@Js
class XText : XNode

XText represents the character data inside an element.

constructors make

Construct a text node with the specified value

fields val

Character data for this text node

cdata

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

methods toStr

Return the string value (truncated if it is long)

copy

Make a copy of this text node

nodeType

Return the XNodeType.text

write

Write this node to the output stream

cdata 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 This copy()

Make a copy of this text node.

make new make(Str val)

Construct a text node with the specified value.

nodeType virtual XNodeType nodeType()

Return the XNodeType.text.

toStr virtual Str toStr()

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

val 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 virtual 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.

Haxall 4.0.5 ∙ 24-Feb-2026 14:33 EST