The Evaluation Version of CMarkup has all the basic methods for parsing, navigation, creating and modifying XML documents for MFC or STL, and you are strongly encouraged to try it in your project before purchasing. When you purchase a CMarkup Developer license you get:
See also the Advanced CMarkup Developer license which gives you everything here plus the same use of additional components not available for source code evaluation.
1. File mode. Read and write super large XML files and read partial files with the CMarkup file modes documented in C++ XML reader and C++ XML writer. After calling
Open, you can use familiar CMarkup methods on the file rather than a fully in-memory document.
Open( szFilename, nDocFlags ) Close() Flush()
2. Store binary data in Base64. The Developer version has encode and decode functions. See
EncodeBase64( pBuffer, nBufferLen ) DecodeBase64( strBase64, pBuffer, nBufferLen )
3. Use paths for quicker navigation. For example, use
while ( xml.FindElem("//a") ) to loop through all hyperlinks in an HTML document. Or specify
"/Message/Payload/Buyer" to go directly to the desired element in one function call rather than several. Even use simple predicates [n], [@attrib] and [CHILDTAG], and the
GetElemPath method. See Paths In CMarkup.
4. Remove attributes and see if they exist. In the Evaluation version you cannot actually remove attributes, you can only set the value to an empty string. The Developer version supports removing attributes as well as testing whether an attribute exists.
RemoveAttrib( szAttrib ) RemoveChildAttrib( szAttrib ) HasAttrib( szAttrib [, pstrAttrib] ) HasChildAttrib( szAttrib )
5. Set and get values by path. Use your CMarkup object as a flexible container by setting or getting a value at any level with one call of
FindGetData. See Dynamic Structure Documents.
FindGetData( szPath ) FindSetData( szPath, szData, nCDATA=0 )
6. Navigate to previous sibling element. The Developer version (7.0) has functions to go to the previous sibling of the main position or child position.
FindPrevElem( szName ) FindPrevChildElem( szName )
7. Use element indexes. It is also very useful to get the handle or index of the current main position element in the document as an integer for more complex navigation. The Developer version contains sample source code for sorting and Breadth-First traversal that use ElemIndex Navigation.
8. Use document offsets. This is useful with using CMarkup in edit controls.
GetOffsets( pnStart, pnLen, [pnInStart, [pnInLen]] ) GetAttribOffsets( szAttrib, pnStart, pnLen, [pnInStart, [pnInLen]] )
9. Reuse deleted index memory. This is a memory management enhancement implemented in the developer version since release 7.0.
10. Element count and level methods. The Developer version comes with
GetDocElemCount (since 9.0) and
GetElemLevel (since 8.3) functions to provide additional information that can be useful.
int GetDocElemCount() int GetElemLevel()
11. XML Formatter. Align and indent markup documents.
GetDocFormatted( nFormatFlags )
Thanks for writing. It can be confusing so for other readers I'll say again that the CMarkup Developer version is for MFC and STL. It is the Advanced CMarkup Developer package that is MFC only (many Windows classes that were developed in MFC).