GetElement method: Document class

Syntax

GetElement(ElementName)

Description

Use this method to retrieve a document element by name. The object returned will be a Collection, Compound, or Primitive object.

Note:

Use the object’s ElementType property to determine which object type is returned.

Parameters

Parameter Description

ElementName

Specifies the name of the document element as a string.

Returns

A Collection object, a Compound object, or a Primitive object.

Example

&Doc = CreateDocument(&DocKey);
&DocElem = &Doc.GetElement("BillTo");

Evaluate &DocElem.ElementType

When = %Document_Compound
   ...

When = %Document_Collection
   ...

When = %Document_Primitive
   ...

When-Other
   Error ...

End-Evaluate;