|
Whitebeam Template Reference Documentation
|
rb.XmlText Object Description (XmlText Template)
Represents an XML Text element - eg a block of text between XML tags. This class inherits all it's behaviour from the
XmlGeneric class. The only
specific behaviour of it's own is the constructor - which takes one mandatory parameter - it's parent position. A seond,
optional parameter provides the initial text for the element. An XmlText element can only be created by specifying the tag to which it is to be attachect (it's parent). Example:
// Find the body element.
var body = rb.xml.root.select('//body')[0];
// Create an H1 title tag.
var heading = new XmlTag(body, '<h1>');
// Add the title text as an XmlText element.
var text = new XmlText(heading, 'First Heading');
|
|
(loadtime : 18ms) |