SetContent

Description

Sets the entire content of the PBDOM_OBJECT.

Syntax

pbdom_object_name.SetContent(pbdon_objectpbdom_object_array)

Argument

Description

pbdom_object_name

The name of the PBDOM object

pbdom_object_array

An array of PBDOM_OBJECT objects to be set as the contents of the PBDOM_OBJECT


Return value

PBDOM_OBJECT. Returns the newly modified PBDOM_OBJECT.

Throws

EXCEPTION_PBDOM_OBJECT_INVALID_FOR_USE -- This PBDOM_OBJECT object is not associated with a derived PBDOM_OBJECT class object.

Usage

The supplied array contains PBDOM_OBJECT objects that are legal for the particular derived PBDOM_OBJECT that is associated with this PBDOM_OBJECT.

For example, a PBDOM_DOCUMENT accepts only an array that contains PBDOM_ELEMENT, PBDOM_COMMENT, PBDOM_DOCTYPE, or PBDOM_PROCESSINGINSTRUCTION objects. In addition, the array can contain only one PBDOM_ELEMENT object that it sets as its root element, and only one PBDOM_DOCTYPE object that is set as its DOCTYPE.

If illegal objects are included in the array, exceptions (specific to the particular derived PBDOM_OBJECT) are thrown. For more details, please refer to the SetContent method of the objects derived from PBDOM_OBJECT.

In the event of an exception, the original contents of this PBDOM_OBJECT are unchanged, and the PBDOM_OBJECT objects contained in the supplied array are unaltered.

See also

AddContent

GetContent

InsertContent

RemoveContent