GetOwnerDocumentObject

Description

Returns the PBDOM_DOCUMENT object that owns the PBDOM_ELEMENT object.

Syntax

pbdom_element_name.GetOwnerDocumentObject()

Argument

Description

pbdom_element_name

The name of a PBDOM_ELEMENT object


Return value

PBDOM_DOCUMENT. The PBDOM_DOCUMENT that owns the PBDOM_ELEMENT object from which the GetOwnerDocumentObject method is invoked. A return value of null indicates that the PBDOM_ELEMENT object is not owned by any PBDOM_DOCUMENT.

Examples

The GetOwnerDocumentObject method is invoked from the following PowerScript code, where pbdom_root_elem refers to the root element of the PBDOM_DOCUMENT object pbdom_doc:

PBDOM_DOCUMENT pbdom_doc
PBDOM_ELEMENT pbdom_root_elem

pbdom_root_elem = pbdom_doc.GetRootElement()

IF 
   pbdom_doc.Equals &
   (pbdom_root_elem.GetOwnerDocumentObject())
THEN
     MessageBox ("Equals", "The objects are equal")
END IF

The Equals method tests for equality between pbdom_doc and the PBDOM_DOCUMENT object returned from the GetOwnerDocumentObject method. A message box reports that the objects are equal.

See also

GetParentObject

SetParentObject