A method for dynamically creating a reference identifier in an electronic
document formatted as a data structure is provided. Hierarchy in the data
structure is followed to reach the root of the data structure, and the
data structure is traversed from the root until a target object is
encountered. A reference identifier is generated from a location of the
target object. As the data structure is traversed, a counter is
incremented when a specified branch of the data structure is encountered,
and the counter is cleared when a specified branch of the data structure
is closed. The reference identifier may be updated to reflect changes in
the data structure. Such changes are reflected on a browser upon
reloading the browser page. Accordingly, the reference identifier
reflects a location of a target object within the structure of the
hierarchy of the document.