Connection Information

To perform the requested action, WordPress needs to access your web server. Please enter your FTP credentials to proceed. If you do not remember your credentials, you should contact your web host.

Connection Type

GetObjectClassString – PB Docs 2021 – PowerBuilder Library

GetObjectClassString – PB Docs 2021

GetObjectClassString

Description

The GetObjectClassString method returns a string form of the class
of the PBDOM_OBJECT.

Syntax

Argument

Description

pbdom_object_name

The name of a PBDOM_OBJECT

Return value

String.

GetObjectClassString returns a string that indicates the class of
the current PBDOM_OBJECT.

The possible return values for classes inherited from
PBDOM_CHARACTERDATA are:

  • pbdom_text

  • pbdom_cdata

  • pbdom_comment

The PBDOM_CHARACTERDATA class itself cannot be instantiated, so
the string “pbdom_characterdata” is never returned.

Examples

This example creates a PBDOM_DOCUMENT based on the following DOM
tree:

The PowerScript code obtains the root element, uses it to obtain
the child element, and then obtains an array of the child element’s own
children. This is an array of three PBDOM_OBJECTs, each of which is a
child node of data. This array provides the ability to access and
manipulate the child nodes, but to illustrate the virtual nature of the
PBDOM_CHARACTERDATA class and the calling of methods of the
PBDOM_CHARACTERDATA class, the example defines an array of
PBDOM_CHARACTERDATA objects.

Each array item of the pbdom_obj_array is assigned to the
pbdom_chardata array, so you can call the methods of each array item
without needing to know what subclass the item belongs to.

Children must be subclasses of PBDOM_CHARACTERDATA

If the data element contained a child that was not a subclass of
PBDOM_CHARACTERDATA, the FOR loop to assign each pbdom_obj_array item
to a corresponding pbdom_chardata array item would fail when it
reached that item.

The MessageBox calls illustrate how the entity reference
< is handled by the different PBDOM_CHARACTERDATA subclasses. In
the PBDOM_TEXT object, it is expanded. In the PBDOM_COMMENT and
PBDOM_CDATA objects, it is not. The character to which the entity
reference refers, “>”, can also be included in a PBDOM_CDATA
object.

See also

GetObjectClass


Document get from Powerbuilder help
Thank you for watching.
Was this article helpful?
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x