GetText
Description
Obtains the text data that is contained within the current
PBDOM_OBJECT.
Syntax
|
1 |
pbdom_object_name.GetText() |
|
Argument |
Description |
|---|---|
|
pbdom_object_name |
The name of the PBDOM_ OBJECT |
Return value
String.
The following table lists the return values, based on the type of
DOM Object contained within a PBDOM_OBJECT:
|
DOM Object Type |
Return Value |
||||
|---|---|---|---|---|---|
|
PBDOM_ELEMENT |
The concatenation of the text values of all the If Extra Spaces There If the PBDOM_ELEMENT definition |
||||
|
PBDOM_ATTRIBUTE |
The text data contained within the PBDOM_ATTRIBUTE If the element with an attribute is <abc |
||||
|
PBDOM_TEXT |
The text data contained within the PBDOM_TEXT For example, suppose there is the
If |
||||
|
PBDOM_CDATA |
The string data that is contained within the CDATA
If
|
||||
|
PBDOM_COMMENT |
The string data that is contained within the
If
|
Throws
EXCEPTION_PBDOM_OBJECT_INVALID_FOR_USE — This PBDOM_OBJECT
object is not associated with a derived PBDOM_OBJECT class
object.
EXCEPTION_MEMORY_ALLOCATION_FAILURE — Insufficient memory was
encountered while executing this method.
Usage
This method returns meaningful data only if the PBDOM_OBJECT is of
a type that can contain text nodes, CDATA sections, or basic text. These
include:
-
PBDOM_ELEMENT
-
PBDOM_ATTRIBUTE
-
PBDOM_TEXT
-
PBDOM_CDATA
-
PBDOM_COMMENT
The PBDOM_TEXT, PBDOM_CDATA, and PBDOM_COMMENT objects are special
cases that cause the GetText method to return the text data that is
intrinsically contained within the objects. A PBDOM_TEXT object is
basically a DOM text node and therefore does not hold any child text
nodes. A PBDOM_CDATA object represents a DOM CDATA object, and therefore
does not hold any child DOM nodes. The same rule applies to a
PBDOM_COMMENT object.
See also