Description
Tests for equality between the PBDOM_ELEMENT object from which the method is invoked and a PBDOM_OBJECT indicated by the method parameter.
Syntax
pbdom_element_name.Equals(pbdom_object pbdom_object_ref)
Argument |
Description |
---|---|
pbdom_element_name |
The name of a PBDOM_ELEMENT object |
pbdom_object_ref |
A PBDOM_OBJECT to be tested for equality with this PBDOM_ELEMENT object |
Return value
Boolean.
Returns true if the PBDOM_ELEMENT object is equivalent to the referenced PBDOM_OBJECT and false otherwise.
Examples
The Equals method is invoked from the following PowerScript code, in which pbdom_doc represents a PBDOM_DOCUMENT object containing a root element:
PBDOM_ELEMENT pbdom_elem_1 PBDOM_ELEMENT pbdom_elem_2 PBDOM_OBJECT pbdom_obj PBDOM_DOCUMENT pbdom_doc pbdom_elem_1 = pbdom_doc.GetRootElement() pbdom_elem_2 = pbdom_doc.GetRootElement() IF pbdom_elem_1.Equals(pbdom_elem_2) THEN MessageBox ("Equals", "The objects are equal") ELSE MessageBox ("Equals", "The objects are NOT equal") END IF pbdom_obj = Create PBDOM_ELEMENT pbdom_obj.SetName("An_Element") IF pbdom_elem_1.Equals(pbdom_obj) THEN MessageBox ("Equals", "The objects are equal") ELSE MessageBox ("Equals", "The objects are NOT equal") END IF
Because pbdom_elem_1 and pbdom_elem_2 refer to the same root element, a message box reports that the objects are equal.