Finds an element by the specified element unique identifier.

(See "What is Element Unique Identifier?" below.)

Parameters:

elementId

The unique identifier of the element to find.
elementTypeSpec
The list of target Element Types (see "Specifying Matching Element Types" below).

When this parameter is specified, the returned element will always comply (and be resolved) with at least one the target Element Types.

Note: You may need to specify this parameter even when the element to find is guaranteed to comply with a certain known Element Type. In that case, the returned GOMElement instance will be resolved with that Element Type, which may be needed for further processing. (For details, see "What are Element Types?" below.)

Returns:

The found element or null, if no element with the specified identifier (and also complied with the target Element Type(s), if specified) exists in the DSM.

See Also:

findElementsByIds(), getElementIds(), GOMElement.id

${include ../../../refs/element_id.htm}

${include ../../../refs/matching_ets_spec.htm}

${include ../../../refs/element_types.htm}