Whitebeam Object Definition

Site Map
 
Home
 
Application Guide
Reference
  Installation
  Configuration
  XML Markup
  JavaScript Classes
  ROM
  Templates
  Environment
  Dev Process
  Tools
  External Links
  Example libraries
Community
Contact Whitebeam
To-Do
Download
Credits
Licence
Whitebeam Users
 
 
 

Whitebeam Object Definition

XmlText Object Description

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');

Whitebeam release 1.3.36
(loadtime : 31ms)