CMarkup SavePos Method
The current position consists of the parent position, the main position and the child position. The
SavePos method saves the position as if it were keeping a named bookmark to remember the full current position. It returns
false if there is no current position.
Update September 27, 2008: The optional
nMap argument is used for additional maps. You can have any number of maps to save and restore positions of different pieces of indexing information. The default map is 0. For more about using multiple maps, see SetMapSize.
For an example of
RestorePos, after navigating to the position in the document of an element that has certain informational attributes or child elements, call
SavePos("info") and then continue navigating to other areas of the document. If you need to refer back to something at the saved position, call
You can also store the position with no name, i.e. an empty string, which makes sense if you only have need for one saved position.
Saved positions are not preserved when the document is in a string or file. This is only for optimization of navigation in memory with a CMarkup object.