Subclasses of XmlBookmark can be used to annotate an XML document.
This class is abstract to prevent parties from inadvertently
interfering with each others' bookmarks without explicitly
sharing a bookmark class.

createCursor

Call the createCursor method to create a new cursor which is
positioned at the same splace as the bookmark. It is much more
efficient to call toBookmark on an existing cursor than it
is to create a new cursor. However, toBookmark may fail if the
bookmark is in a different document than the cursor. It is
under these circumstances where createCursor needs to be called
on the bookmark. Subsequent navigations to bookmark
positions should attempt to reuse the last cursor to
improve performace.

toBookmark

getKey

The default key for bookmarks is the class which implements
them. This way, multiple parties using bookmarks in the
same instance document will not interfere with eachother.
One can, however, override getKey() to use a key other than
the class.