IsAncestorObjectOf

Description

Determines whether the current PBDOM_ATTRIBUTE object is the ancestor of another PBDOM_OBJECT.

Syntax

pbdom_attribute_name.IsAncestorObjectOf(pbdom_object pbdom_object_ref)

Argument

Description

pbdom_document_name

The name of a PBDOM_ATTRIBUTE object

pbdom_object_ref

A reference to a PBDOM_OBJECT to check against


Return value

Boolean.

Returns true if this PBDOM_ATTRIBUTE is the ancestor of the input PBDOM_PBOBJECT 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.

Usage

This method checks to see whether the current PBDOM_ATTRIBUTE is the ancestor object of the input PBDOM_OBJECT. According to the W3C DOM specification, only a PBDOM_TEXT and a PBDOM_ENTITYREFERENCE object can become a child object of a PBDOM_ATTRIBUTE, and therefore a PBDOM_ATTRIBUTE can only be an ancestor of a PBDOM_TEXT or a PBDOM_ENTITYREFERENCE object.