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

RemoveContent – PB Docs 125 – PowerBuilder Library

RemoveContent – PB Docs 125

PBDOM_ATTRIBUTE:

RemoveContent method

Description

Removes
the input PBDOM_OBJECT from the PBDOM_ATTRIBUTE.

Syntax

Argument

Description

pbdom_attribute_name

The name of the PBDOM_ATTRIBUTE

pbdom_object_ref

The PBDOM_OBJECT child to be
removed from this PBDOM_ATTRIBUTE

Return Values

Boolean. Returns true if
the content has been successfully removed and false otherwise.

Throws

EXCEPTION_INVALID_ARGUMENT – The
input PBDOM_OBJECT is invalid. This can happen if it has
not been initialized properly or is a null object reference.

EXCEPTION_PBDOM_OBJECT_INVALID_FOR_USE – This PBDOM_ATTRIBUTE
object or the input PBDOM_OBJECT is not associated with
a derived PBDOM_OBJECT class object.

EXCEPTION_USE_OF_UNNAMED_PBDOM_OBJECT – This PBDOM_ATTRIBUTE
or the PBDOM_OBJECT to be removed is nameable and has not
been given a user-defined name.

EXCEPTION_WRONG_DOCUMENT_ERROR – The
input PBDOM_OBJECT is not contained within the same PBDOM_DOCUMENT
as this PBDOM_ATTRIBUTE.

EXCEPTION_WRONG_PARENT_ERROR – The
input PBDOM_OBJECT is not a child of the current PBDOM_ATTRIBUTE.

Examples

This example adds an attribute to the root element
with the name my_attr and text content “attribute
text”. It then creates a PBDOM_ENTITYREFERENCE object
named ent_ref and inserts it before
the attribute’s current content.

At this point, my_attr contains
two child PBDOM_OBJECTs: a PBDOM_TEXT containing “attribute
text” and a PBDOM_ENTITYREFERENCE named ent_ref.
The element looks like this when serialized:

A call to GetContent returns an array containing
these two PBDOM_OBJECTs. pbdom_obj_array[1] should
point to the PBDOM_TEXT. After pbdom_obj_array[1] is
removed from my_attr, the element
looks like this when serialized: <root
my_attr="&ent_ref;">
.

Usage

The RemoveContent method removes the input
PBDOM_OBJECT from this PBDOM_ATTRIBUTE. Currently,
only a PBDOM_TEXT and a PBDOM_ENTITYREFERENCE
object can be part of the contents of a PBDOM_ATTRIBUTE.
Therefore, the input PBDOM_OBJECT must be either a PBDOM_TEXT
or a PBDOM_ENTITYREFERENCE object.

See Also


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