Chapter 3 DynaScript Predefined Objects


The DOMText object

Object

Represents textual content.

Syntax

To use a DOMText's property:

DOMText.propertyName

To use a DOMText's method:

DOMText.MethodName( parameter ) 

Description

DOMText objects inherit all of the properties and methods of the DOMCharacterData object.

If there is no markup inside an element's content, the text is contained in a single DOMText object that is the only child of the element. If there is markup, the content is parsed into a list of elements and text nodes that form the list of children of the element.

When a DOMDocument is created (via the toDOMDocument method), there is only one DOMText object for each block of text. Additional DOMText objects can then be added, resulting in adjacent text nodes without intervening markup. You can use the normalize method on a DOMElement to merge adjacent DOMText objects into a single DOMText object.

See also

"DOMCharacterData object".

 


Copyright © 1999 Sybase, Inc. All rights reserved.