CMarkup OutOfElem Method
Whereas IntoElem is used to go deeper into the document,
OutOfElem is used to get back out. When you call
OutOfElem, the main position goes to the parent element and the child position goes to what was the main position. The return value is
false if the current position is already at the top of the document.
<config> <diagnostics d="3"> <file>C:\temp\a.txt</file> </diagnostics> </config>
If the main position is the file element, calling
OutOfElem makes the diagnostics element the main position (leaving the file element as the child position). Another call to
OutOfElem makes the config element the main position (leaving the diagnostics element as the child position). Another call to
false and leaves the config element as the main position and the diagnostics element as the child position.
Update March 24, 2009:
OutOfElem can be used with CMarkup release 11.0 developer version file read mode (see C++ XML reader) and file write mode (see C++ XML writer). In the file modes, the meaning of
OutOfElem is the same as otherwise but its usage is limited to the forward-only purposes of file reading and writing. In file read mode
OutOfElem goes "out of" the current element to find elements and nodes after its end tag. In file write mode,
OutOfElem goes "out of" the current element to add elements and nodes after its end tag, and unlike regular CMarkup usage it sets the current position after end tag.