Archived CMarkup Release Notes
CMarkup Release 8.3
October 19, 2006
This release implements an alternative to strerror for Windows CE, a couple of fixes and a method in the developer version to get the level of the current element.
- Windows CE Embedded Visual C++ developers no longer need to work around the missing
strerrorfunction used since release 7.0. - fix: SavePos/RestorePos did not work on non-ASCII names
- fix: copy constructor bug since release 8.0 in copying a CMarkup object containing a removed saved position *thanks Mario Priller
|
The following items pertain exclusively to CMarkup Developer: |
- GetElemLevel method returns level of element where root element is level 0
CMarkup Release 8.2
February 12, 2006
This release adds user bit flags to elements for support of the new virtual tree control class, and navigation based on attribute value in the paths feature of the Developer version.
- 4 bit flags are now supported in GetElemFlags and SetElemFlags at
0xf000000for user-defined usage such as the tree node display state (expanded or not) in theCMarkupTreeCtrl. This feature is only for temporary conditions that are not to be persisted in the XML document itself.
|
The following items pertain exclusively to CMarkup Developer: |
- specify attribute value in FindElem path so you can navigate to specific elements more easily, e.g.
[@attrib='value']. See Paths In CMarkup
CMarkup Release 8.1
August 17, 2005
This is a follow-up release with minor enhancements and fixes.
- CMarkupSTL now defines
strnicmpas_strnicmpon VC++ 6.0 forward (see CMarkup STL Platforms) - CMarkupMSXML
SetMainPosPtrwas added to aid in setting the position after an external call toselectSingleNodeorselectNodes(see MSXML Wrapper CMarkupMSXML) - fix: AddSubDoc with a document fragment containing multiple top level elements or no elements
- fix: DTD quote parsing, 8.0 was finding elements inside DTD entity quotes
- fix: HTML parsing, 8.0 was treating the start tag of
<a href=dir/>..</a>as an empty element
|
The following items pertain exclusively to CMarkup Developer: |
- change: the GetOffsets inner start (
pnInStart) argument now returns equal to the start (pnStart) for empty elements, and GetOffsets now also returns offsets for non-element nodes
CMarkup Release 8.0
July 12, 2005
HTML support in CMarkup headlines this major release that includes generic markup, XML content fragments, XML log files with no root element, and a feature in the developer version to easily find an element anywhere in the document.
- HTML and other markup support detailed in Generic Markup In CMarkup
- SetElemContent and GetElemContent methods, see also the update about getting child elements in Navigating and Getting Information From a Document
- EscapeText and UnescapeText Functions
- New flags to control tags, whitespace and encoding in AddElem and SetData, see AddElem and SetData Flags
- RestorePos now fails if position has been deleted
- Node Methods in CMarkup have been made available in the evaluation version so users can try out HTML and other markup
- fix: crash on RestorePos if SavePos never called *thanks Jonas Gauffin
- fix:
#importMSXML DLL compiler bugno_function_mappingwork-around for MSXML 3.0 and 4.0 builds, see MSXML 3.0 in CMarkupMSXML
|
The following items pertain exclusively to CMarkup Developer: |
- find anywhere path e.g.
//A, simple predicates [n] [@attrib] and [CHILDELEM], new method GetElemPath (in CMarkupMSXML too) returns path of main position element, and CMarkupMSXML absolute path changed to work the same as CMarkup. See Paths In CMarkup - CMarkupMSXML proper copy constructor implemented using GetElemPath and
x_FindElemto set position in copied object
CMarkup Release 7.3
December 5, 2004
This release introduces WriteTextFile and ReadTextFile utility functions, and adds integer data value overloads of AddElem and similar methods. The Developer Version has improved the MBCS build of MFC CMarkup to convert UTF-8 documents to ANSI upon load. If you are upgrading, please read these notes carefully for changes in AddElem and ANSI charset conversion that might affect your project.
- ReadTextFile and WriteTextFile Utility Functions
- Integer data value overloads of AddElem AddChildElem InsertElem and InsertChildElem. Note that
AddElem("tagname",NULL)will now be ambiguous since there is no type information forNULLso if you want no content instead of a 0 (zero) useAddElem("tagname") - CMarkupMSXML
SetDefaultNamespacemethod to set the default namespace for document creation. MSXML does not allow you to simply set the xmlns attribute in the root element; it is an argument to the creation of each element node. Call this method once before adding elements to the new CMarkupMSXML object *noted by Steve Reilly - fix: attribute value quote fix *found by Bill Brannan
- fix: parser 7 bug that rejected tag names starting with a non-ASCII character
|
The following items pertain exclusively to CMarkup Developer: |
- New support for XML Declaration encoding with the GetDeclaredEncoding static utility function, and the
MBCSbuild of MFC CMarkup now converts Unicode file to ANSI on read (UTF8ToA), and back to Unicode on write (AToUTF8). This conversion in the MBCS build is a change from the previous release; always use an XML declaration to specify encoding if your file is not Unicode! - fix: UTF8ToA now uses a question mark for unsupported chars and optionally provides a count of unsupported characters; previously it assumed that the text could be represented in the ANSI locale charset
CMarkup Release 7.2
September 27, 2004
This release introduces several small improvements. SetData splits CDATA Sections containing the end delimiter string, and GetData concatenates CDATA Section and text nodes. In other words, when SetData is called with the CDATA Section flag, it now creates multiple CDATA Sections when the data contains ]]>, but note that AddNode(MNT_CDATA_SECTION,data) still returns false if the data contains the end string. The highlights of this release are:
- SetData and SetChildData with the
nCDATAflag will split CDATA Sections to support the]]>end string rather than reverting to a parsed text node (also implemented in CMarkupMSXML which prior to Release 7.2 would throw an exception) - GetData and GetChildData now properly process and concatenate any combination of text and CDATA Section nodes in the element content, discarding XML comments and processing instructions (it already worked properly in CMarkupMSXML prior to Release 7.2)
- fix: assignment operator on empty document *noted by Soren Madsen
- fix: an attribute value may contain a greater than symbol (W3C XML Spec AttValue) *noted by Patrick Desrosiers
|
The following items pertain exclusively to CMarkup Developer: |
- Load and Save methods support UTF-8 signature, see UTF-8 Files and the Preamble
- UTF-16 file flag changed to
MDF_UTF16LEFILE, see UTF-16 Files and the Byte Order Mark (BOM)
CMarkup Release 7.1
August 28, 2004
This is primarily a bug fix release. If you are using 7.0, please upgrade! CMarkup 7.0 overhauled indexing and parsing and a few new bugs made it into the release. These bugs plus a couple other issues have been fixed and the test routines updated.
- fix: a previous element link was missed when inserting an element or subdocument between siblings *noted by Bill Brannan
- fix: empty flag was incorrectly set when adding or inserting a subdocument with no child elements *noted by Bill Brannan
- fix: parser was rejecting tag names starting with underscore or colon *thanks Stefan Herber
- fix: no more 64-bit warnings in MarkupSTL.cpp (done in Markup.cpp for release 7.0), see UNICODE ATL CMarkup - Without MFC
- fix: added
#includefor<string.h>and<errno.h>in MarkupSTL.cpp to supportstrerror(errno), NETWARE compiler was not gettingerrno*thanks Frank Sowinski
CMarkup Release 7.0
July 17, 2004
25% faster, and smaller footprint! This is an overhaul of the indexing and parsing technology yielding new features and efficiencies while remaining backward compatible in the public methods. The CMarkup parser was already extremely fast, but the new parsing implementation is 25% faster. New double-linking means faster adding of last sibling element and removing elements. There are quite a few new features:
- New parsing, faster, no recursion, and improved error messages, Inside the CMarkup Parser
- Replaced
CMapandmapwith small efficient internal structure, reducing MFC/STL dependence to string class only, and reducing overall CMarkup object instantiation footprint by 20% - AddSubDoc/AddChildSubDoc now remove trailing nodes
- String reallocation for speed of generating document (also called speed of save, see Speed of CMarkup) is now in the evaluation version so that potential customers won't think it is slow (originally implemented 3 years ago in developer release 6.0)
- New indexing improves efficiency of some methods, CMarkup Indexing Explained
- fix: extra comma in release 6.6 SetDoc error string
- fix: no more VC++ .NET 64-bit warnings in Markup.cpp, UNICODE ATL CMarkup - Without MFC
- fix: although CMarkupMSXML with MSXML 3.0 forward does not require conversion before
loadXMLas introduced in Release 6.6,loadXMLwith non-BSTR was generating a stack overflow on multi-megabyte documents, soCMarkupMSXML::SetDochas been changed back to converting to BSTR first
|
The following items pertain exclusively to CMarkup Developer: |
- FindPrevElem and FindPrevChildElem for backwards element navigation
- Reuses indexes of removed elements to reduce and stabilize memory consumption on documents that are repeatedly modified in memory
- SetDoc can take a string reference for another significant performance gain
- Keeps track of whether document has been modified (i.e. dirty flag)
CMarkup Release 6.6
May 3, 2004
This release enhances the index memory implementation for handling large documents. Plus, the Developer version has improved UTF-16 file support and charset conversions.
- New segmented index array replaces
CArray/vectorto enhance memory efficiency for large multi-megabyte documents. This new array class improves parsing performance (about 3%), and has a smaller footprint than the replaced class - Converged MFC and STL Load and Save (no
CFileorallocator) - More examples and tests: INI-Style Sections and Entries, Speed test, Setting the XML Declaration With CMarkup.
- fix: CMarkupMSXML leak plugged with
falsein constructor:_bstr_t bstrDoc(A2BSTR(szDoc),false);*thanks Dharmesh - CMarkupMSXML with MSXML 3.0 forward does not require conversion before
loadXMLsoA2BSTRonly used prior to MSXML 3.0 - GetError/GetDoc return
const &*thanks Tom Spilman
|
The following items pertain exclusively to CMarkup Developer: |
- UTF-16 UTF-8 conversion methods UTF8To16 and UTF16To8
- Load and Save methods support UTF-16 Files and the Byte Order Mark (BOM)
- UTF-8 ANSI conversion methods with UTF8ToA and AToUTF8 methods
- Tests for ANSI to UTF-8, and UTF-16 to UTF-8
- Child index methods GetChildElemIndex and GotoChildElemIndex
CMarkup Release 6.5
April 23, 2003
This release adds support for end-of-line customization, numeric character references, as well as MSXML 4.0, .NET compiling, and MBCS improvements. There are quite a few fixes and Documentation updates too.
x_EOLfor customizing the end-of-line in document creation and modification. It can be changed to UNIX style\nor empty if you want the whole document on one linex_ATTRIBQUOTEfor using single quote when creating attributes- Numeric Character References now supported, i.e.
<and中are decoded - MSXML 4.0 build option for CMarkupMSXML, MSXML 4.0 in CMarkupMSXML
- Removed Visual Studio VC++ 7/.NET compiler warnings by casting string size and file length to
int - fix: MBCS double-byte text
x_TextToDoc*thanks knight_zhuge - fix: MBCS double-byte text was also failing in
x_TextFromDocdue to#ifndef _tclenadded in 6.3. It was changed to#ifdef _WIN32_WCE - fix: Add SubDoc with preceding node such as PI *noted by Tony Nancarrow
- fix: Special end-of-line case when adding into parent with empty data
- fix:
CoUninitializein CMarkupMSXML *thanks Robert Bouwens - fix: CMarkupMSXML processing instruction data and text node data were potentially parsed incorrectly
|
The following items pertain exclusively to CMarkup Developer: |
- Get and Set attributes in processing instructions (not in CMarkupMSXML), including the XML declaration *noted by Jonnie White
- GetOffsets changed to give data offsets in addition to outer offsets, and GetAttribOffsets added. Offset methods are non-EDOM, not in CMarkupMSXML, and are now only supported in the Developer version.
CMarkup Release 6.4
October 7, 2002
A lot of work has been done on the CDataEdit Class making it stable enough for release in the new free promotional editor. As of 6.4, CMarkup comes with a Test Dialog project and improved testing of the different CMarkup builds. This release also includes several fixes and new methods.
- New Test Dialog interface with diagnostic results and load vs. parse times
- Improved test verification code moved to
CMarkupDlg::RunTestrun at start up - Main position subdoc methods GetSubDoc, AddSubDoc, InsertSubDoc.
- See how to load UCS-2 encoded files found in Windows CE and sometimes in NT/2000/XP
- fix: bug in
UNICODEDecodeBase64, attention Windows CE developers! *noted by Eric from France - fix:
#include <stdio.h>added to MarkupSTL.cpp for compiling on G++ Linux
|
The following items pertain exclusively to CMarkup Developer: |
- Index methods (and sort example!) GetElemIndex, GotoElemIndex (not in CMarkupMSXML)
- fix: Node method bugs: FindNode text starting with quote, AddNode comment/PI in empty element, and GetData when current node is CDATA Section
CMarkup Release 6.3
April 2, 2002
This major overhaul of the CMarkup classes introduces the long-awaited intuitive IntoElem method making main position methods more useful, and there are new ResetMainPos and InsertElem methods. Caution: The change to IntoElem is not completely backwards compatible with 6.2 because now it will not look for the first child if there is no current child position. Few corners of the CMarkup, CMarkupSTL, and CMarkupMSXML classes have escaped re-working due to the implementation of 6.2 bug fixes, parent position logic, and node support. The result is across the board improvements in efficiency and consistency of method functionality and source code.
- Intuitive IntoElem by virtue of new current parent position.
- Windows CE compile issues *help from Reto Bucher and other CE devs
- UNIX compile issue *thanks Wim Bokkers
- CMarkupMSXML fixes: x_Insert, MSXML3 subdocs, SetDoc
- fix: parser accepts single quotes *most recently noted by Mark Finkle
- String searching change improves parser performance at least 5%
- Improved test and sample code in
CMarkupApp::OnAppTest
|
The following items pertain exclusively to CMarkup Developer: |
Comments and mixed content are now supported in the developer version via nodes with the FindNode, AddNode, InsertNode, RemoveNode, and GetNodeType methods. You can navigate, create and modify comments, processing instructions, text nodes, CDATA sections and elements, as well as the DTD (as a whole). These new methods were carefully designed to blend naturally into EDOM and complement the element-based methods. EDOM still revolves around elements. In the CMarkup object, only 3 new integers were added to the object to track the current node, so no noteable new overhead is incurred. During document parsing, CMarkup still only calculates element indexes so there is no affect on parser performance.
CMarkup Release 6.2
November 1, 2001
This release speeds up name comparisons and adds a debugging aid.
- Tag and attribute names are compared directly to names in the document without constructing a substring of the document, improving the performance of parsing and finding elements. This reduces the number of string object constructions, and increasing CMarkup's speed.
- Have you ever been debugging code that uses CMarkup and wonder where the current position or child position is? There is a new debugging feature in CMarkup and CMarkupSTL exposing these positions in debug mode.
|
The following items pertain exclusively to CMarkup Developer: |
- Now you can find elements based on path, plus use FindSetData and FindGetData methods for accessing your XML document like a structure. For example:
csStatus = doc.FindGetData("/*/OrderStatus")
CMarkup Release 6.1
August 1, 2001
This release has numerous fixes, enhancements, and some new EDOM methods. And we introduce a lite version on the The Code Project so that now the firstobject site is the only place to download the full evaluation version.
- Load and Save methods
- The IsWellFormed method has been added to check whether the document has been successfully parsed. Now an CMarkup object can contain text even if it has not been successfully parsed. This allows useful data persistence and better error identification.
- Double-Byte supported in CMarkup with the
MBCSdefine and_tccpyand_tclenMFC routines. This is not compatible with UTF-8, so if you are using UTF-8 in MFC check your project settings C/C++ preprocessor definitions to make sure_MBCSis not defined. - In the STL version,
#include "stdafx.h"has been removed along with all dependency on it. This was an MFC-ism that should have been removed a long time ago. - The editor window
CDataEditis now extremely fast on huge documents. Note that some edit functionality is not complete yet. Look for these fixes, syntax coloring and other XML features in future releases. - fix: the = operator was not properly copying the index array in CMarkup
- Improved STL
x_TextToDocandx_TextFromDocto reserve size and reduce reallocations. - Option for case insensitive search on tag names and attribute names. This is not available in CMarkupMSXML because strictly speaking it is not correct XML and I do not think MSXML supports it. One of the benefits of having the source code is flexibility to deal with B2B realities such as non-compliant XML.
- 6.1 Lite submitted to The Code Project. The lite version demonstrates a small set of EDOM methods in MFC only, but does not require a license to be used in commercial applications.
|
The following items pertain exclusively to CMarkup Developer: |
- Base64 Functions in CMarkupSTL (previously only in CMarkup)
- New methods RemoveAttrib, RemoveChildAttrib
- Option for adding version tag.
CMarkup Release 6.0
July 9, 2001
UTF-8 support is completed with an enhanced CDataEdit that demonstrates UTF-8 and Wide-Char Win32 APIs in a non-UNICODE build (see UTF-8 in CMarkup and CDataEdit). Parse errors are now displayed in the status bar, including (in the MSXML build) the "reasons" provided by the MSXML service. Index array sizing is smarter to improve the efficiency of parsing.
- UTF-8 supported in all builds
- Index array sizing is smarter
- Parse errors displayed
- Text of document displayed even when file has parse error
- Submitted to The Code Project
|
The following items pertain exclusively to CMarkup Developer: |
Base64 support is now available as methods in CMarkup for encoding and decoding a binary buffer. A new enhancement has improved the way the document string grows when building documents using the creation and modification methods. This reduces reallocations in both the MFC and STL versions and greatly speeds the creation of medium to large documents.
- EncodeBase64 and DecodeBase64 functions
- String reallocation management improved
CMarkup Release 5.7
June 29, 2001
This release introduces UTF-8 support in the Windows NT UNICODE build, and the parser will now look past simple DTD sections (!DOCTYPE tags). A new edit control was built from scratch to replace the richedit control and support unicode better. This edit control does specialized text wrapping on tags, and may support XML syntax highlighting in the future. However, in this release it is suitable for viewing but not editing large documents because it recalculates the entire document on each keystroke.
- UTF-8 loading and saving in Unicode builds
- Look past simple DTD sections
CDataEditcontrol replacesCRichEditCtrl- Submitted to The Code Project
CMarkup Release 5.6
June 1, 2001
CDATA sections is the highlight of this release. Until now, CMarkupMSXML had non-EDOM methods called AddCDATA and GetCDATA, but CDATA sections have been standardized as part of the Get/SetData methods across all the CMarkup classes and it was made a part of EDOM.
- Unicode build for MSXML
- Implemented MSXML GetAttribName method
- Added support for CDATA sections
- Enhanced tree interface with icons and attributes
- fix: removed Add Elem right-click menu option from root *noted by Amy S
- fix: GetAttribName error in empty element
- fix: CMarkupMSXML::SetDoc("") first chance exception debug messages
- fix: comments not separated by space *noted by Jan Piot
- fix: char encoding bug in STL
Add/Insert[Child]Elemmethod *thanks to Plinius - Added code to demonstrate non-MFC loading of files
- Submitted to The Code Project
CMarkup Release 5.5
April 13, 2001
The heretofore missing Set/GetData methods are now included, and subdocument support is now in STL and MSXML versions.
- Implemented SetData and SetChildData methods
- Implemented subdocument methods in STL and MSXML classes
- fix: add subdocument in empty element (was creating invalid index)
- fix: save/restore position (was not storing level) *thanks to Patrik Tesar
- fix: GetData methods to return empty string if element contains child elements
- Submitted to The Code Project
CMarkup Release 5.4
April 4, 2001
This includes a lot of important fixes and code enhancements.
- fix: STL memory leak (and removed strstream) *bug found by Tom Brinkman
- fix: BSTR conversion in MSXML version (BSTR constructor failed if over 512K)
- Made CMarkup classes const aware *noted by Vince Bartlett
- Put using std namespace in STL cpp rather than header *noted by Vince Bartlett
- fix: Visual C++ 6.0 Level 4 warnings *noted by David Emery
- Put build name in title
- Submitted to The Code Project
CMarkup Release 5.3
March 23, 2001
This release introduces the STL version which everyone was asking for. And a very useful addition to EDOM is the subdocument methods which are implemented here in the MFC version of CMarkup only.
- Implemented STL version *initial work by Leon Matthews
- Added subdocument methods (in base MFC version)
- fix: MSXML parse test 5.2 bug
- Submitted to The Code Project
CMarkup Release 5.2
March 20, 2001
To implement the Unicode version, the MFC CMarkup class and the Markup project now use _T() and _TCHAR defines, so that the project can be compiled for unicode. The resulting Unicode executable works in Windows NT and CE.
- Implemented Unicode build configuration *initial work by Von Chance
- Improved comment parsing to allow special chars *noted by Jeff Higgins
- fix: AddChildElem and InsertChildElem to put the elements in the correct sequence
- fix: CMarkupMSXML GetData *thanks to Paul Winwood
- Show milliseconds time span of parse in status bar
- About Box shows build option in title bar
- Submitted to The Code Project
CMarkup Release 5.1
March 7, 2001
Based on first Code Project user comments, more EDOM methods and basic support for comments have been implemented. A build configuration for the version that uses MSXML makes it easier to try CMarkupMSXML. And the EDOM documentation has been greatly improved.
- Implemented SetAttrib, SetChildAttrib, SavePos, RestorePos, GetAttribName
- Allow comments in the document
- Implemented File->Test menu item for cascaded test documents in Markup project
- Renamed method
InsertElemBeforeto InsertChildElem to be in line with naming convention - Created build configuration for MSXML version
- Improved EDOM documentation to explain methods in detail
- fix: AddChildElem was setting wrong indexes when added to empty parent *noted by Milton Palmer
- fix: RemoveElem and RemoveChildElem were setting current position next instead of prev
- Submitted to The Code Project
CMarkup Release 5 and Previous Releases
February 11, 2001
CMarkup was originally developed in January 1999 and posted on the firstobject.com site on May 16, 1999. It was billed as a class to perform simple XML document parsing and creation by just adding markup.cpp and markup.h to your Visual C++ 6.0 project. It was used primarily in projects of First Objective Software and clients. The second release was made available on January 22, 2000 with some additional methods. On October 30, 2000, the EDOM draft specification was put up and CMarkup release 3 methods were brought to comply with it, though not all of the methods were implemented. Release 4 on November 6, 2000 introduced the Markup MFC MDI project allowing you to see CMarkup in action. We added the CMarkupMSXML class which had cut its teeth in an intensive communications application for 10 months. This was a useful resource because of the rarity of examples of using MSXML from C. Release 4.2 on January 6, 2001 contained some bug fixes. Finally for February 11, 2001, the Markup project was cleaned up, packaged as Release 5 and submitted to The Code Project for its first real exposure to developers not familiar with First Objective Software, Inc.



CMarkup Release 9.0
April 1, 2007
Now with STL/UNICODE out of the box, this release does away with the separated CMarkupSTL class in favor of compiling CMarkup for either STL string or MFC CString. See Unified CMarkup for STL and MFC.
CMarkupSTL" in their code to "CMarkup," use Markup.cpp/.h instead of MarkupSTL.cpp/.h, and putMARKUP_STLin their project defines. See Unified CMarkup for STL and MFC.UNICODEandMBCSsupport.ToBSTRFromBSTRToVARIANTFromVARIANTutility functions to simplify code and perform correct conversions to and from wide char in non-UNICODEbuilds.The following items pertain exclusively to CMarkup Developer:
[CHILDTAG]of Find methods utilizing paths, e.g.FindElem("/root/B[ID]/C").