lz.DataText
Represents a text node in a set of data.

JavaScript: lz.DataText
extends lz.DataNode » lz.Eventable »
An lz.DataText represents a text node a in a hierarchical dataset. An lz.DataText can only contain text data. It can be a child a of an lz.DataElement. See the example on lz.DataNodeMixin.

Attributes

Name Type (tag) Type (js) Default Category
data   String   read/write
  The data held by this node.
length   Number   readonly
   
nodeName   String   read/write
  The name of this node. According to W3C-specs, nodeName for LzDataText should return "#text".

Methods

LzDataText()
lz.DataText.LzDataText(text : String);
This object represents a text node in a set of data.
Parameter Name Type Description
text String The text that this node holds.

setData()
lz.DataText.setData(newdata : String);
[Caution] This method is deprecated
Use setAttribute('data', ...) instead.
Sets the string that this node holds.
Parameter Name Type Description
newdata String The new string for this node.

Methods inherited from lz.Eventable

destroy, setAttribute

Events

Name Description
ondata  

Events inherited from lz.Eventable

ondestroy