PBDOM_OBJECT:
GetText method
Description
Obtains
the text data that is contained within the current PBDOM_OBJECT.
Syntax
1 |
<span>pbdom_object_name</span>.GetText()<span><span></span></span> |
Argument |
Description |
---|---|
pbdom_object_name |
The name of the PBDOM_ OBJECT |
Return Values
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 If the PBDOM_ELEMENT definition is Extra Spaces
There are extra spaces between the word “Data” and “now” and If the PBDOM_ELEMENT definition is: |
||||
PBDOM_ATTRIBUTE |
The text data contained within the PBDOM_ATTRIBUTE If the element with an attribute is |
||||
PBDOM_TEXT |
The text data contained within the PBDOM_TEXT object
If there is a |
||||
PBDOM_CDATA |
The string data that is contained within
If
|
||||
PBDOM_COMMENT |
The string data that is contained within
If there is a PBDOM_COMMENT
|
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.