findCommonAncestor

Type: Function

Deprecated!

Use XPath instead.

Find the common ancestor of the two nodes in the given blueprint. The common ancestor is the deepest node containing both nodes.

Refer to blueprintQuery for more information on how to import and use this function.

Arguments

  1. blueprint

    (Required)

    Type: Blueprint

    The blueprint in which to consider the nodes

  2. node1

    (Required)

    Type: Node

    First node

  3. node2

    (Required)

    Type: Node

    Second node

Returns

Type: Node | NULL

The common ancestor, or null if the nodes are in separate trees.