What is Element Unique Identifier?

It is an object which uniquely identifies the element within the DSM (Data Source Model).

Such an identifier is generated for each element by the DSM Type Driver.

In case of an XML-file data source (supported by DocFlex/XML), if the element has an attribute of "ID" type, the value retuned by the call:

element.id.toString()
will be equal to the value of that attribute (however, element.id itself won't be the same as that attribute, because XML cannot guaranty uniqueness of such identifiers).

Two GOMElement objects can be compared only by their IDs (i.e. element1 and element2 represent the same DSM element if and only if element1.id == element2.id).

Also, element identifiers always fit to be hash-keys, so you can use them as keys in element maps (see Functions by Category | Elements / Attributes | Element Maps).

In some DSM Types, elements may have attributes of "IDREF" type (see GOMAttribute.valueType). The values of such attributes are unique identifiers of other elements in the DSM. Those elements can be found using findElementById() or findElementsByIds() functions (the former may be needed in case of multi-valued attributes; see GOMAttribute.multiValued). For example:

findElementById (
  element.getAttrValue("attrName")
)
The functions getElementByLinkAttr()/getElementsByLinkAttr() allow you to do the same with a single call:
getElementByLinkAttr("attrName")

See Also:

GOMElement.id, findElementById(), findElementsByIds(), getElementByLinkAttr(), getElementsByLinkAttr()