Description
Sets the referenced PBDOM_OBJECT as the parent of the PBDOM_ELEMENT object from which the method is invoked.
Syntax
pbdom_element_name.SetParentObject(pbdom_object pbdom_object_ref)
Argument |
Description |
---|---|
pbdom_element_name |
The name of a PBDOM_ELEMENT object |
pbdom_object_ref |
The PBDOM_OBJECT to be set as the parent of this PBDOM_ELEMENT object |
Return value
PBDOM_OBJECT. The PBDOM_ELEMENT object modified and returned as a PBDOM_OBJECT.
Throws
EXCEPTION_PBDOM_OBJECT_INVALID_FOR_USE -- If the input PBDOM_OBJECT is not associated with a derived PBDOM_OBJECT.
EXCEPTION_PBDOM_OBJECT_ALREADY_HAS_PARENT -- The input PBDOM_OBJECT already has a parent.
EXCEPTION_INAPPROPRIATE_USE_OF_PBDOM_OBJECT -- If the input PBDOM_OBJECT is not allowed to be the parent of a PBDOM_ELEMENT object.
EXCEPTION_USE_OF_UNNAMED_PBDOM_OBJECT -- If the input PBDOM_OBJECT is nameable and has not been named.
Usage
If the class of the referenced PBDOM_OBJECT is PBDOM_DOCUMENT, then the behavior of SetParentObject is identical to that of the SetDocument method. If the class of the referenced PBDOM_OBJECT is PBDOM_ELEMENT, SetParentObject sets the referenced object as the parent of the PBDOM_ELEMENT object from which the method is invoked. If the referenced PBDOM_OBJECT is of any other class, an exception is thrown.
See also