Home   |   Products   |   Documentation
 

 
 

News from firstobject.com

News RSS Feed:

   

These are the summaries of the articles, notifications, releases, and announcements published at firstobject.com. There is also a Discussion and Beta Update Feed to monitor more frequent activity. Don't forget you can use the free firstobject News Reader to keep track of this and other feeds.

7.0-9.0 Issue: Memory checkers report uninitialized variable 18-Apr-2008 -- IBM Rational Purify and Boundschecker may complain that nTagLengths is not initialized before it is used in void SetStartTagLen( int n ) { nTagLengths = (nTagLengths & ~EP_STMASK) + n; };. This is caused by the way tag lengths were implemented in the struct ElemPos nTagLengths member since Release 7.0. It is not actually utilizing uninitialized bits, but the memory checkers might not know that....

firstobject Access Language 26-Jul-2007 -- The firstobject access language "FOAL" based on C++ syntax is specialized for retrieving and reporting information in markup text documents. It also introduces an efficient and versatile way of doing lists and structures using markup. Built around the CMarkup API, it opens up new potential for rapid development of high performance processing and transformation of XML and other markup documents. ...

firstobject XML Editor Release 2.2 26-Jul-2007 -- Release 2.2 introduces programming with FOAL and numerous fixes and enhancements. The following list indicates changes from release 2.1, many of which have also been mentioned and further explained for the interim Beta releases in the firstobject XML Editor Comments.

CMarkup Methods 14-May-2007 -- These are the methods of the CMarkup class, based on the original EDOM design. This is the master list of CMarkup methods. The shaded methods are only available in the Developer Version of CMarkup. Initialization Load Populates the CMarkup object from a file and parses it SetDoc Populates the CMarkup object from a string and parses it Output Save Writes the document to file GetDoc Returns...

Documentation re-write! 14-May-2007 -- This is a massive overhaul of the documentation, reorganized around the CMarkup Methods with lots of new example code.

What are MCD_STR and MCD_CSTR? 14-May-2007 -- You will see MCD_ identifiers for strings and constant strings in the CMarkup method declarations. MCD_STR is defined in Markup.h as a string class which, depending on your project, can be one of the following: std::string (STL) std::wstring (STL/UNICODE) CString (MFC) These string classes have built in efficiencies for passing by value, so they can be returned from functions without incurring...

XML Versioning 08-Apr-2007 -- XML formats, languages, and vocabularies tend to evolve. Versioning is an extremely important consideration in the design of an XML format. The very first version of an XML format invariably fails to foresee even the complete immediate uses of it! But it doesn't matter because during initial development none of the products using that XML are released yet and you can keep revising it until you...

Unified CMarkup for STL and MFC 01-Apr-2007 -- As of CMarkup release 9.0, CMarkup can be compiled for either MFC or STL strings. Prior to this release, the CMarkupSTL class was separate from CMarkup. STL goes prime time! The primary result of merging these classes has been a lot more functionality for the STL version including UNICODE support and text encoding conversion functions. CMarkupSTL customers who are upgrading to 9.0 should do the...

Dynamic Structure Documents 01-Apr-2007 -- A CMarkup object can be used as a "dynamic structure document" to mimic the functionality of a simple C/C++ struct, but without compile-time rigidity. Compile-time checking of struct member names and types is often helpful, but it requires you to declare all of the members you might need even if you are unlikely to need them, and usually modifies a header file which affects other modules. For...

CMarkup Release 9.0 01-Apr-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.

GotoParentElemIndex Method 01-Apr-2007 updated 14-May-2007 -- GotoParentElemIndex sets the current parent position to the element at the specified index. It clears the main and child positions. See ElemIndex Navigation for the full story on all the ElemIndex methods. Element indexes can be retrieved with GetElemIndex, GetChildElemIndex and GetParentElemIndex. In addition to GotoParentElemIndex, there are GotoElemIndex and GotoChildElemIndex methods. The...

GetDocElemCount Method 01-Apr-2007 updated 14-May-2007 -- GetDocElemCount returns the number of elements in the document. This might be useful to gain a sense of the complexity of the document, statistically. It is also a way of estimating CMarkup's memory consumption since CMarkup maintains one structure of 8 integers per element, though there will usually be additional unused structures allocated. See CMarkup Indexing Explained.

GetParentElemIndex Method 01-Apr-2007 updated 14-May-2007 -- GetParentElemIndex returns the current parent position element's internal index. See ElemIndex Navigation for the full story on all the ElemIndex methods. This index can be specified in the GotoElemIndex, GotoChildElemIndex and GotoParentElemIndex methods. In addition to GetParentElemIndex, there are GetElemIndex and GetChildElemIndex methods. When there is no current main position, such as...

Advanced CMarkup Developer 02-Nov-2006 updated 26-Jul-2007 -- This is not a typical component package because it is the entire source code for these freeware programs. All of these features are demonstrated in action, allowing you to learn by example which is perhaps the deepest, most reliable kind of documentation. A few of the classes are lightly documented (follow the links below), but may change slightly from release to release within reason. The...

firstobject XML Editor Release 2.1 19-Oct-2006 -- Release 2.1 includes tree customizations, Go To Line, MSXML validate, plus a couple of minor fixes.

CMarkup Release 8.3 19-Oct-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.

GetElemLevel Method 19-Oct-2006 updated 14-May-2007 -- This method returns the "level" of the current main position element. If there is no main position, it returns 0. If the current parent position is the root element, the main level is 1.

8.2 Bug: SavePos/RestorePos with non-ASCII names 05-Sep-2006 -- A report of a crash caused by using the firstobject XML editor tree customization feature with Unicode text turned up an underlying bug in releases 7.0 to 8.2 of CMarkup (MFC) and CMarkupSTL (STL). A non-ASCII character name in SavePos and RestorePos will cause a GPF.

XML Namespaces and CMarkup 29-Jul-2006 -- XML Namespaces are an attempt by the creators of the XML standard to systematize the development of markup vocabularies of element and attribute names (see Namespaces in XML for the motivation behind XML namespaces and all the gory details). The bottom line is that XML Namespaces often become an obstacle to developers needing to deploy applications and parse existing documents, but CMarkup allows...

Compiler Issues 26-Jul-2006 -- The CMarkup test MFC project should compile in Visual Studio 6.0 and newer versions without any problems. However, sometimes issues come up. It has been tested on Visual Studio 2003 and 2005 but there are different beta versions and options possible leading to minor differences. See the following topics for additional information on compiling specific to STL and MSXML versions: Pre-compiled...

firstobject News Reader Comments 02-Mar-2006 -- Comments about features and bugs are posted here with most recent on top and the responses are updated as the questions are addressed in new releases of the editor. Beta releases are posted here for download. Screenshots and instructions are on the firstobject News Reader page. Search.Msn.Com news formatting change?M Jessick 13-Nov-2006 I have enjoyed using the firstobject News Reader for some...

Lookup XML Data with CMarkup 27-Feb-2006 updated 26-Mar-2006 -- CMarkup makes navigation easy and efficient with its core methods. These can bring you real value at lightning speeds, and all while keeping your code easily maintainable and extendable. Loop And Compare What could be easier than using familiar core functions of your XML tool to loop through all the items until finding the one that matches? Here is an example involving the need to ignore case...

New Beta program and comment feed 21-Feb-2006 -- "Beta" releases of the free firstobject utilities are being made available to increase responsiveness. This allows bug fixes and simple new features to go out instantly rather than waiting for the next official release. The editor Beta 2.0.1 is the first Beta release. It is on the firstobject XML Editor Comments page.

SetElemFlags Method 12-Feb-2006 updated 14-May-2007 -- SetElemFlags allows you to set the custom user flags of the main position element. The four bits (0xf000000) are reserved for custom user flags, so only those bits can be set. You can set up to four bit flags with the values: 0x1000000 0x2000000 0x4000000 0x8000000 These flags only last as long as the CMarkup object is not "reparsed" with SetDoc or Load, and are not preserved when all or part of...

firstobject XML Editor Release 2.0 12-Feb-2006 -- Release 2.0 with the new tree control is finally ready. Previously, the tree was a Windows common control that on large documents could take significant time to load up large numbers of sibling elements. The new tree control (CMarkupTreeCtrl) is a "virtual" control drawn from a CMarkup object such that the tree does not load any data. The new tree also shows element and attribute values. Also new...

GetElemFlags Method 12-Feb-2006 updated 14-May-2007 -- This function returns the "custom user" and "public" flags of the current main position element. See the SetElemFlags method for details of the "custom user" flags. The public element bit flags are set for non-well-formed problems during parsing. The MNF_NONENDED bit flag indicates an element is regarded as non-ended, i.e. no end tag was found where expected (see Containment Hierarchy). The...

CMarkup Release 8.2 12-Feb-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.

RSS: Create and Read Feeds With CMarkup 01-Jan-2006 -- An RSS feed is an XML format with a list of items used by News Readers and Aggregators. You can create your own feed by creating an XML file and putting it on your website. News Readers simply check your file periodically to see if there are any new items in it. CMarkup can easily create RSS documents and parse existing ones (but note that CMarkup does not provide Internet access to download feeds...

Transformation Example: Apples to Oranges 21-Dec-2005 updated 10-Jan-2006 -- It is truly impressive that some developers have mastered a challenging technology such as XSLT which makes any moderately complex task nearly impossible. But is it really worth it? It is funny to me when someone being helpful on Microsoft XSL newsgroup produces a big long stylesheet solution that appears absolutely cryptic. Below is a 55 line transformation example taken from a post called how...

Subdocuments and Fragments of XML Documents 03-Dec-2005 -- This article discusses the terminology of document fragments and the details of CMarkup's support for them. A subdocument is an element with its attributes and all its content as a unit, even if the element contains a whole tree of elements. Also, a subdocument is a well-formed document on its own, for example: A document fragment can be anything that you would find in the content of an element....

CMudCtrl Class 18-Nov-2005 -- CMudCtrlCWndCMudCtrlfirstobject News Reader To use CMudCtrl in your Visual Studio MFC project, just add MudCtrl.cpp and MudCtrl.h. Put a CMudCtrl member variable in a parent window class such as a dialog or view and create it with its Create method. Call the SetContent( CString csContent, BOOL bResetTop = TRUE ) method to populate the control. You can specify plain text as the content and unlike...

Ben Bryant is blogging 11-Oct-2005 -- Yes, I'm now posting articles about programming topics, the software industry and firstobject plans at codesnipers.com and benpoint.com (no, not personal stuff about my adorable wife and son or what movie I went to). Over on CodeSnipers.com I've been writing for a couple of months now on text encoding topics like various character sets and Unicode, but any topic is game. Example titles so far are:

firstobject XML Editor Release 1.7 30-Sep-2005 -- This very minor release re-enables the Encoding menu feature and adds support for the HTML encoding setting.

Source code added to Advanced product 30-Sep-2005 -- The firstobject News Reader MFC source code project has been added to the Advanced CMarkup Developer License product (see Products). It is still available as a free executable program, but previously there was no way for customers to obtain the source code. The CMudCtrl (MUD stands for MarkUp Draw) is a versatile HTML subset control. Unlike the IE-based Windows HTML view, CMudCtrl allows you to...

firstobject News Reader Release 1.2 30-Sep-2005 -- This release adds a lot of usability enhancements in answer to user feedback.

CMarkup Release 8.1 17-Aug-2005 -- This is a follow-up release with minor enhancements and fixes.

firstobject XML Editor Release 1.6 17-Aug-2005 -- Edit XML without a single root element and even HTML! Plus this release has many usability enhancements based on your feedback like hotkeys and formatting/indenting for partial documents.

MSXML Wrapper CMarkupMSXML 14-Jul-2005 updated 17-Aug-2005 -- Since near the beginning of CMarkup, there has always been a companion MSXML wrapper version of CMarkup which provides a way to get started with MSXML in Visual Studio. This is great if you want to use MSXML but want to avoid the initial learning curve of programming to the COM interface, or if you are accustomed to CMarkup methods but want to take advantage of specific MSXML features. To get...

Transformation Using CMarkup 13-Jul-2005 -- CMarkup has always provided the ability to do transformation procedurally, but with release 8.0 some features have been added to improve support for transformation, including to generate HTML. To understand CMarkup's transformation features, first consider the following simple XSL example, that takes an XML data file and matches it with an XSL style sheet to produce an XHTML result for display....

Why To Avoid XSLT 13-Jul-2005 updated 10-Jan-2006 -- XSLT (not provided by CMarkup) is considered the normal mechanism for transforming XML for viewing in a browser, but it can make software more difficult than it needs to be. This article discusses some of the experiences and common issues with XSLT. If you're using CMarkup and you just want to get on with the job of processing XML for display in a browser, see Transformation Using CMarkup for a...

GetParentElemPath Method 12-Jul-2005 updated 14-May-2007 -- The GetParentElemPath method is the same as the GetElemPath method except that it returns the absolute path of the parent position element. If the parent position is at the top of the document, it returns an empty string. See Navigating Levels in CMarkup and Paths In CMarkup.

GetChildElemPath Method 12-Jul-2005 updated 14-May-2007 -- The GetChildElemPath method is the same as the GetElemPath method except that it returns the absolute path of the child position element. If there is no current child position, it returns an empty string. See Paths In CMarkup.

UnescapeText Method 12-Jul-2005 updated 14-May-2007 -- The UnescapeText static utility function is used internally to unescape the Standard Special Characters when extracting a text value from the document. You can use it to unescape special characters when dealing with markup text directly. The UnescapeText function works for both null terminated strings and strings that are not if nTextLength is specified. The Standard Special Characters are...

HTML And CMarkup 12-Jul-2005 -- Simply put, you can navigate the HTML and find all hyperlink or image elements, or whatever you are looking for. You can also add and remove elements, attributes and content. The following HTML document happens to be a nearly well-formed XML document except for the mismatched case of the P element. To use CMarkup with hand-generated HTML, set the MDF_IGNORECASE document flag. The following...

Log Files Without A Root Element 12-Jul-2005 -- Due to the requirement of a single root element, well-formed XML documents are not well designed for the purpose of applications where XML records are appended to the end of a file. However, there is so much demand for this that many home grown work-arounds have been invented. CMarkup release 8.0 takes a step towards helping out by providing support for XML files without root elements. Most XML...

AddElem and SetData Flags 12-Jul-2005 -- SetData always had a CDATA Section flag 1 (now identified by MNF_WITHCDATA), but with release 8.0 another flag (MNF_WITHREFS) has been introduced. AddElem now has an optional third argument accepting these two flags plus MNF_WITHNOLINES, MNF_WITHNOEND, and MNF_WITHXHTMLSPACE. The flags in AddChildElem, InsertElem and InsertChildElem work the same as in AddElem. Likewise, the SetChildData and...

GetElemContent Method 12-Jul-2005 updated 14-May-2007 -- The GetElemContent method returns the main position element's markup content. Unlike GetData this returns the content as a markup string including child elements. This method is similar to GetSubDoc in that it returns a markup string except that it returns the "inner XML" between the start and end tag of the main position element rather than the "Outer XML" including the start and end tags. The...

Containment Hierarchy 12-Jul-2005 -- CMarkup maintains a hierarchy of elements that contain other elements (see Navigating Levels in CMarkup). In well-formed XML this is an unambiguous logical representation of the markup because all elements are correctly ended and nested. Even in a document that is not well-formed, a containment hierarchy can still be useful. This article describes the way the containment hierarchy is determined in...

Other Markup 12-Jul-2005 -- As part of the CMarkup release 8.0 support for Generic Markup In CMarkup, any non-XML arrangement of tags can be navigated using CMarkup. See also HTML And CMarkup. It is possible to use an abbreviated markup system in which end tags are intentionally omitted for brevity. This is not recommended because it means leaving the XML standard for questionable benefit, but it can be navigated using...

EscapeText Method 12-Jul-2005 updated 14-May-2007 -- The EscapeText static utility function is used internally to escape the Standard Special Characters when inserting a text value into the document. You can use it to escape special characters when dealing with markup text directly. The EscapeText function accepts optional flags which can be OR'd together. The MNF_ESCAPEQUOTES flag indicates that single and double quotes should be escaped (this is...

SetElemContent Method 12-Jul-2005 updated 14-May-2007 -- The SetElemContent method replaces the main position element's content with the markup in szContent. This is different from SetData which encodes any special markup characters in the data value. See Subdocuments and Fragments of XML Documents. SetElemContent is like AddSubDoc in that it deals with putting a markup string into the document. However, unlike a subdocument, content is not rooted...

GetElemPath Method 12-Jul-2005 updated 14-May-2007 -- The GetElemPath method returns the absolute path of the main position element. See Paths In CMarkup. In the following example XML document there are six elements: This code prints the paths for those six elements. Every path is unique and provides a way of returning to the element (with the FindElem method) after navigating away from it. However, if the first diagnostics element were removed,...

CMarkup Release 8.0 12-Jul-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.

Generic Markup In CMarkup 12-Jul-2005 -- "Markup" in XML and HTML refers to the use of "tags" built with less than and greater than signs, also called angle brackets, in the document to add structure and meaning to the text. With release 8.0, CMarkup has been changed slightly to support other forms of markup than just well-formed XML. This allows CMarkup to navigate generic markup documents such as: HTML And CMarkup Other Markup Log...

ElemIndex Navigation 23-Jun-2005 updated 01-Apr-2007 -- The ElemIndex methods take advantage of CMarkup's internal indexing to provide an extremely efficient way to store and recall element positions when navigating the document (when you know what you're doing). The SavePos and RestorePos methods have a similar purpose but can be more cumbersome than these index methods. Like SavePos and RestorePos the ElemIndex methods end up being unnecessary in...

firstobject XML Editor Comments 08-Jun-2005 updated 22-Feb-2008 -- Comments about features and bugs are posted here with most recent at the top and the responses are updated as the questions are addressed in new releases of the editor. Download, screenshots and instructions are on the firstobject XML Editor page. editor Beta 2.2.5 Far East char performanceBen Bryant 22-Feb-2008 foxe225Beta.zip 374k. This release greatly improves performance of displaying...

firstobject site re-worked 02-Jun-2005 -- The web site has been re-organized to be cleaner and simpler and content management has been improved to faciliate posting new articles and your comments more quickly. The goal is to accelerate the addition of CMarkup documentation and samples. Some articles have been updated as part of this site release including CDATA Sections, and Setting the XML Declaration With CMarkup

firstobject News Reader Release 1.1 17-Mar-2005 -- Screensaver animation has been added in this release to give the option of specifying the News Reader as your Windows Desktop screen saver. Other improvements fill out the functionality without changing the sheer simplicity of the application. This release adds search, Atom support, Unicode, more info in the main list, Back/Forward, and preference settings. The News Reader is still multi-threaded...

WriteTextFile Method 05-Dec-2004 updated 14-May-2007 -- WriteTextFile is a static function (with no knowledge of the data members of a CMarkup object) used internally by the Save method. It writes a string to file, creating the file or replacing it if it exists, sometimes performing a text encoding conversion. See ANSI and Unicode Files. WriteTextFile is the corresponding function to ReadTextFile. The last argument to the WriteTextFile method is the...

ReadTextFile Method 05-Dec-2004 updated 14-May-2007 -- ReadTextFile is a static function (with no knowledge of the data members of a CMarkup object) used internally by the Load method. It reads a file into a string, sometimes performing a text encoding conversion. See ANSI and Unicode Files. Sometimes you need to know whether a failure to load is due to a file error, or a parser error. In this case, using the Load method can be inconvenient as...

firstobject XML Editor Release 1.5 05-Dec-2004 -- Non-Unicode encodings are now supported and the new encoding features offer more choice and versatility than most text editors. You can select from a list of available character sets to set the XML Declaration for save and to override the automatic character set handling from the Open dialog. There are several other new features as well.

GetDeclaredEncoding Method 05-Dec-2004 updated 14-May-2007 -- This method can be used to obtain the encoding name from the XML Declaration at the beginning of an XML string without having parsed the string. GetDeclaredEncoding parses only the xml processing instruction at the beginning of the document. If no encoding value is found, an empty string is returned. The reason this is a separate static function, and not a method that operates on the object...

CMarkup Release 7.3 05-Dec-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.

AToUTF8 Method 05-Dec-2004 updated 14-May-2007 -- AToUTF8 converts an ANSI string to UTF-8, returning the UTF-8 string. You must #include <locale.h> and call setlocale(LC_ALL, "") (or similar) somewhere in your program to enable the system ANSI code page in the C++ multibyte functions. There is also a corresponding UTF8ToA method for converting in the other direction. These routines are only compiled in the non-UNICODE build, i.e. if...

UTF8ToA Method 05-Dec-2004 updated 14-May-2007 -- UTF8ToA converts a UTF-8 string to ANSI, returning the ANSI string. You must #include <locale.h> and call setlocale(LC_ALL, "") (or similar) somewhere in your program to enable the system ANSI code page in the C++ multibyte functions. Typically you will use this conversion on string values that will be used in ANSI Windows functions, not on tag names and values known to be identifiers or...

Simple Merge Example 24-Nov-2004 -- CMarkup is great for merging, splitting and transforming XML documents. Many of these processes involve a Depth First Traversal of an XML document which simply means running through all of the elements in the order they would appear in an editor. For a merge you would generally traverse one document while looking for corresponding elements in the other. In the simplest case of a merge, element...

7.2 Bug: Quotes in Attribute Values 09-Oct-2004 -- apostrophe problemBill Brannan 9-Oct-2004 My XML document is suddenly not being accepted in release 7.2 due to an attribute containing an apostrophe.

CMarkup Release 7.2 27-Sep-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...

firstobject XML Editor Release 1.4 27-Sep-2004 -- This release combines added CMarkup 7.2 efficiency with some Unicode file encoding improvements, non-Word-Wrap, and a couple of fixes. The integration with CMarkup 7 allows editing of very large documents with significantly lower memory requirements than CMarkup 6.6 in the previous editor release. The improved BOM handling comes with an option to change it e.g. load a UTF-16 file and save as UTF-8...

UTF-8 Files and the Preamble 27-Sep-2004 -- The UTF-8 preamble, also known as the UTF-8 BOM or signature, is a 3 byte sequence at the start of a file indicating it is UTF-8. Like the UTF-16 BOM, this is not particular to XML, it is for any text file. But unlike the UTF-16 BOM, Byte Order Mark is not a correct term in this case because in UTF-8 there is no byte order. In hex, the UTF-8 preamble is ef bb bf. While the UTF-16 BOM is standard,...

6.6-7.1 Bug: Assignment Operator 30-Aug-2004 -- heap corruptionSoren Madsen 30-Aug-2004 Whenever a CMarkup object is assigned the value of an empty CMarkup document there is heap corruption (which can be detected in MFC with AfxCheckMemory() after calling AddElem). There is no problem if the CMarkup object on the right hand side contains any elements, so this is a somewhat rare situation. The case that was reported was using xml = CMarkup(); to...

CMarkup Release 7.1 28-Aug-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.

7.0 Bug: Previous Element Link 09-Aug-2004 -- previous link bugBill Brannan 9-Aug-2004 CMarkup seems to lose track of elements after RemoveElem since upgrade to release 7.0.

CMarkup Developer 07-Aug-2004 updated 02-Nov-2006 -- Top 10 exclusive features of CMarkup Developer version 1. Store binary data in Base64.EncodeBase64DecodeBase642. Use paths for quicker navigation. Call FindElem with paths such as "/Message/Payload/Buyer" to go directly to the desired element in one function call rather than several. Or use //Buyer to find elements with the tag name Buyer anywhere, plus use simple predicates [n], [@attrib] and...

7.0 Bug: Empty Subdocument 04-Aug-2004 -- empy subdocument bugBill Brannan 4-Aug-2004 When upgrading to CMarkup 7.0, after AddChildSubDoc with the following element as a subdocument: <analysis_name>Analysis</analysis_name> Debugging shows that GetChildTagName == "analysis_name" so GetChildData SHOULD == "Analysis" but it is returning "" instead. It thinks it is an empty element due to a bug in AddChildSubDoc.

7.0 Bug: Tag Names 28-Jul-2004 -- parser rejects certain tag namesStefan Herber 28-Jul-2004 Tagnames like "_Example" produce an error on parsing xml files.

FindPrevElem Method 17-Jul-2004 updated 14-May-2007 -- This method moves the main position to the previous sibling element. If there is no previous sibling element it returns false and leaves the main position where it was. The FindPrevElem method has an optional argument which allows you to specify a tag name. Calling FindPrevElem("ITEM") will look for a previous sibling ITEM element starting at the element before the current main position and...

AddChildSubDoc Method 17-Jul-2004 updated 14-May-2007 -- Similar to AddSubDoc, the AddChildSubDoc method is called to add a markup string subdocument in as a child element of the current main position element. The subdocument is added after the child position or as the last child if there is no child position. Only call this method if there is at least a main position. After a child element (subdocument) is successfully added, the child position points...

CMarkup Indexing Explained 17-Jul-2004 -- Over 3 years ago, I wrote an explanation of CMarkup indexing which is now being replaced by this article. Release 7.0 is an overhaul of the indexing system used before this point, but not a fundamental change. For each element, there are still eight 32-bit integers used to store the location and tree links. These integers are now used more efficiently and more intuitively. CMarkup is fast (see...

The Problem With DTD and XML Schema Validation 17-Jul-2004 updated 20-May-2007 -- Validation by DTD or XML Schema is often used for the sake of industry compliance or simply because developers think that to use XML you must formally validate it. But it is rarely something that directly or powerfully improves the software. In fact, the use of validation against DTDs and XML Schemas is counter-productive to creating good software in many different situations. There is one case...

GetChildSubDoc Method 17-Jul-2004 updated 14-May-2007 -- The GetChildSubDoc returns the child position element and any elements it contains as an XML document markup string, similar to GetSubDoc but for the child position. It is different from GetChildData, which gets the data value of the child element. The GetChildSubDoc method returns an XML document in which the root element was the child position element in the source document. See Subdocuments...

InsertChildSubDoc Method 17-Jul-2004 updated 14-May-2007 -- Like the AddChildSubDoc method, the InsertChildSubDoc method is called to insert a markup string subdocument in as a child element of the current main position element. The subdocument is inserted before the child position or as the first child if there is no child position. Only call this method if there is at least a main position. After a child element (subdocument) is successfully inserted,...

CMarkup Release 7.0 17-Jul-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...

Inside the CMarkup Parser 17-Jul-2004 updated 12-Jul-2005 -- Although CMarkup is often called a "parser," parsing is only part of what CMarkup does since it also supports navigating, creating and modifying documents as well as other functions like UTF16To8 and EncodeBase64. Nevertheless, the parser is the single most important part of CMarkup because that is how it imports and provides access to existing XML documents. The parser does its work in the...

FindPrevChildElem Method 17-Jul-2004 updated 14-May-2007 -- If there is a main position and no current child position, FindPrevChildElem() locates the last child under the main position and makes it the child position. If there is a child position, it moves to the child position before it. If there is no child element or no previous child element, it returns false and leaves the child position where it was. The FindPrevChildElem() method does not affect...

CDATA Sections 03-Jun-2004 updated 02-Jun-2005 -- CDATA Sections designate an area in the XML document where Standard Special Characters are not escaped and whitespace is preserved. They are commonly used for putting chunks of HTML inside an XML document, or to preserve whitespace and line feeds in a data value when the document is transferred between XML tools. Use CDATA Sections for anything containing markup that must be ignored by the rest of...

6.6 Bug: Comma in Error String 26-May-2004 -- Release 6.6 introduced an extra comma in the error string. After calling SetDoc( strXML ) with ill-formed XML, the result of GetError() has a comma at the beginning. This bug only exists in Release 6.6.

firstobject XML Editor Release 1.3 26-May-2004 -- Handling of very large documents is greatly improved. This editor was already efficient at 100+MB documents compared to other editors, but now it incorporates the CMarkup 6.6 index array improvement, plus another fix which reduces memory requirements of editing. Altogether, this release utilizes as much as 1/3 less memory, and 2/3 less contiguous memory than the previous release. Here is the list...

UTF-16 Files and the Byte Order Mark (BOM) 03-May-2004 updated 27-Sep-2004 -- UTF-16 (RFC 2781) is a Unicode encoding (the same as "wide char") that is sometimes used in files on Windows operating systems. It is only used sometimes, and even in programs that are compiled for _UNICODE (wide char), text is normally stored to file in single or multi-byte encoding systems (ANSI or UTF-8). See ANSI and Unicode Files for more about this. As with UTF-8, a UTF-16 file does not...

GetChildElemIndex Method 03-May-2004 updated 14-May-2007 -- GetChildElemIndex returns the current child position element's internal index. If there is no current child position, it returns 0. See ElemIndex Navigation for the full story on all the ElemIndex methods. This index can be specified in the GotoElemIndex, GotoChildElemIndex and GotoParentElemIndex methods. In addition to GetChildElemIndex, there are GetElemIndex and GetParentElemIndex methods. ...

UTF16To8 Method 03-May-2004 updated 14-May-2007 -- UTF16To8 converts the UTF-16 string in pwszUTF16 to UTF-8 in the pszUTF8 string buffer. It uses the same arguments as the ANSI C wcstombs function, but instead of converting to the locale charset it converts to UTF-8. The pwszUTF16 source must be a null-terminated UTF-16 string. If pszUTF8 is NULL, the number of bytes required is returned and nUTF8Count is ignored. Otherwise pszUTF8 is filled...

UTF8To16 Method 03-May-2004 updated 14-May-2007 -- UTF8To16 converts the UTF-8 string in pszUTF8 to UTF-16 in the pwszUTF16 string buffer. It uses the same arguments as the ANSI C mbstowcs function, but instead of converting from the locale charset it converts from UTF-8. The pszUTF8 source must be a UTF-8 string which will be processed up to null-terminator or nUTF8Count. If pwszUTF16 is NULL, the number of wide chars required (i.e. UTF-16...

GetDocFlags Method 03-May-2004 updated 14-May-2007 -- The GetDocFlags method returns the flags that pertain to the entire document object. See also the SetDocFlags method. The MDF_IGNORECASE bit controls whether CMarkup is case sensitive when finding element tag names and attribute names. If the MDF_UTF16LEFILE bit is on, the file is encoded in UTF-16. See UTF-16 Files and the Byte Order Mark (BOM). The MDF_UTF8PREAMBLE bit is set, when a 3-byte...

SetDocFlags Method 03-May-2004 updated 14-May-2007 -- SetDocFlags sets the flags that pertain to the entire document object. See the GetDocFlags method for a description of the flags. The MDF_IGNORECASE flag is usually set when the CMarkup object is instantiated, before the HTML is loaded and parsed. It also affects navigation. See HTML And CMarkup. When setting a flag such as MDF_MODIFIED during the course of the lifespan of the CMarkup object,...

CMarkup Release 6.6 03-May-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.

GotoChildElemIndex Method 03-May-2004 updated 14-May-2007 -- GotoChildElemIndex sets the current child position to the element at the specified index. The element that contains it will automatically become the main position element. See ElemIndex Navigation for the full story on all the ElemIndex methods. Element indexes can be retrieved with GetElemIndex, GetChildElemIndex and GetParentElemIndex. In addition to GotoChildElemIndex, there are GotoElemIndex...

ANSI and Unicode Files 03-May-2004 updated 04-May-2007 -- UTF-8 is the recommended encoding for XML files. If your text is all ASCII, then it is also valid UTF-8. But if your XML file is not ASCII and not Unicode (i.e. not UTF-8 or UTF-16/UCS-2) then you really should use an XML Declaration to declare your encoding. For example if it is the default U.S. ANSI charset use this declaration: Overview of ANSI Code Pages In Windows programming, the term ANSI...

firstobject News Reader 18-Feb-2004 updated 30-Sep-2005 -- Adding News Feeds On the right are two example right-click menus showing how to copy the link from an XML icon in Internet Explorer and from an RSS hyperlink in Mozilla Firefox. Feeds are generally indicated by one of the following icons: or . Adding a feed to your News Reader is often called "syndication." You may see a link for XML Syndication, or simply an XML or RSS or ATOM icon on the...

firstobject News Reader Release 1.0 18-Feb-2004 -- The first release of this News Reader is a fully multi-threaded application to utilize negligible CPU and provide an interface with no waits. A notification window pops up for 8 seconds to display newly arriving items. Any XML feed is supported, but RSS 0.91, 1.0 and 2.0, and two Code Project Web Service formats are specifically supported for organizing in terms of items.

INI-Style Sections and Entries 25-Nov-2003 -- The INI file is the old Windows standard for keeping program settings, preferences and configurations. Here is an example of an INI file. Each section starts with a bracketed section name and has a list of key=value entries. Here is an example XML format to contain the same information. You might want to use the section names and entry names (keys) as tag names in your XML format, but if there is...

CThread Release 4 25-Nov-2003 -- The CoInitialize(NULL) and CoUninitialize() calls in CThread::StartAddress have been removed in this revision because they were unnecessary. If your thread utilizes any COM components, you can add these calls into your implementation of the Main method. *thanks Mike Danielson

Depth First Traversal 15-Sep-2003 updated 02-Jun-2005 -- Depth first traversal is the same as looping through all the elements in document order, i.e. the order you would encounter them reading from top to bottom. There are two common purposes for a traversal: one is for finding an element or elements anywhere in the document, the other is for processing the entire document to selectively copy out information. Update July 12, 2005: Note that while...

6.5 Bug: CMarkupMSXML Leak 28-Aug-2003 -- CMarkupMSXML SetDoc Wastes Memoryvia Dharmesh Shah 28-Aug-2003 The leak in SetDoc() and x_AddSubDoc() is still in 6.5. ...in our services applications it ended up loosing a pointer to a copy of a BSTR the size of a whole XML document we were loading from a string.

firstobject XML Editor Release 1.2 06-Jul-2003 -- This release brings syntax coloring and EDOM code generation. Here is a list of the enhancements:

Setting the XML Declaration With CMarkup 02-Jul-2003 updated 21-Jul-2005 -- The XML Declaration is the version tag that appears at the beginning of document. It is optional when it is the default version 1.0 and ASCII (which is a subset of UTF-8) or any Unicode encoding. When you instantiate your CMarkup object, pass the XML declaration including a CRLF if you want. Or pass it to your SetDoc call. If the document already exists and you want to add an XML declaration to...

UNICODE ATL CMarkup - Without MFC 04-Jun-2003 updated 02-Jul-2004 -- ATL UNICODE No MFCJohn Xu 2-Jul-2004 Currently my project is Non MFC with Unicode (ATL). I am using CMarkupSTL. But looks like CMarkupSTL doesn't have the Unicode support. Update April 1, 2007:release 9.0CMarkupIf you are using Visual Studio 7.0 (VS.NET), you can use CString without MFC (CAtlString). Release 7.0 of CMarkup only uses CString and no other MFC classes, and it has been tested with...

firstobject XML Editor Release 1.1 25-May-2003 -- This release fills in all of the obvious shortcomings of 1.0 such as tab characters, search and replace, context menus. It also takes the usability a step further, making the F5 hot key a handy way of re-parsing and displaying the current location in the tree as you edit the document. So finding the location goes both ways now: from the text into the tree and from the tree into the text; plus now...

Numeric Character References 23-Apr-2003 -- CMarkup release 6.5 adds support for decoding numeric character references encountered in a document. This is a way of specifying a character by using its Unicode value written out as a number. The numeric character references begin with &# and contain either a regular number (base 10) or a hexidecimal number prefixed with x, followed by a semi-colon. They are used mainly for whitespace and...

GetAttribOffsets Method 23-Apr-2003 updated 14-May-2007 -- See the GetOffsets method for details of how document offsets work. GetAttribOffsets allows you to obtain the offsets into the document text for the specified attribute. The following XML document has an attribute in the NAME element. The last two arguments are optional; they are for obtaining the location of the value inside the quotes. The following example gets the starting offset and length...

GetOffsets Method 23-Apr-2003 updated 14-May-2007 -- CMarkup is set apart from other XML tools by the fact that it keeps the document intact rather than storing it internally as a collection of individual nodes. And with CMarkup all whitespace is preserved. This yields great efficiencies when working together with a text editor. The Offsets methods give you a unique opportunity to implement mechanisms that take advantage of knowing element and...

CMarkup Release 6.5 23-Apr-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.

Compiling CMarkupMSXML with MSXML 4.0 22-Apr-2003 -- The CMarkup project release 6.5 comes with debug and release build options for MSXML 4.0. This is the same as the MSXML build, except that MARKUP_MSXML4 is defined in addition to MARKUP_MSXML. The MARKUP_MSXML4 define only affects the #import "msxml4.dll" and CreateInstance( __uuidof(MSXML2::DOMDocument40)) lines in MarkupMSXML.h and MarkupMSXML.cpp respectively. You need to download MSXML4 if...

Attributes With CMarkup 16-Apr-2003 updated 23-Nov-2005 -- attributes parsingTent Sergiu 16-Apr-2003 I have to parse a xml doc in which elements have random number of attributes and I don't know the names for these attributes. How can I get the number of attributes an element has? See GetAttribName. In MFC, find the element, and then loop through the attributes as follows: EDOM - XML Attributes with empty string valuesDavid Brue 23-Nov-2005 I am using...

Multithreading and CMarkup 27-Mar-2003 updated 15-Jun-2006 -- CMarkup can be used in multithreaded applications easily. Since there are no static members, you can always use CMarkup objects in different threads simultaneously if no two threads look at the same CMarkup object. There is nothing to stop you from using as many CMarkup objects in as many threads as you like. The simple rule is that if multiple threads access a single instance of CMarkup (i.e. a...

Speed of CMarkup 14-Mar-2003 updated 02-Jun-2005 -- CMarkup parses megabytes quickly (typical times for 3MB are under a tenth of a second, see CMarkup Performance Tests), it also generates megabytes quickly, so if you run into any unexpected speed issues there might be something outside of CMarkup involved. Parsing documents is faster than generating documents. Note also that attributes are not indexed, so if the document utilizes attribute values...

Windows CE and CMarkup 10-Mar-2003 updated 19-Oct-2006 -- CMarkup has been used on Windows CE since early in 2001, using the UNICODE build. CMarkup is great there because of its small footprint. But new releases of CMarkup are not tested on Windows CE so there have been small compile issues in some releases. CMarkup not working in WinCE 3.0Thanh Ly 10-Mar-2003 CMarkup class doesn't seem to be working on PocketPC devices running the older Windows CE...

Checking the Top of the File 24-Feb-2003 -- Checking top of XML fileJuan Carlos Cobas 24-Feb-2003 Suppose I have a very large file (e.g. > 10 MB) and I just want to read the root element tag to make sure that the file is actually a file created by my application. So far, I'm reading all the file into the memory but I guess this is not very efficient as I'm only interested in the root element ... Could you please advise me about how to read...

Pre-compiled Header Issue 30-Jan-2003 updated 01-Apr-2007 -- When using CMarkup in Visual Studio, you may get the following error: You either have to turn off the precompiled header setting for Markup.cpp or add #include "stdafx.h" at the top of Markup.cpp. precompiled headersGeorge 02-Mar-2007 Using vs.net 2005 I was able to compile everything ok. Here is something maybe the users should be aware: suppose you create a simple Windows app (console app)...

6.4 And Prior Bug: MBCS Build 29-Jan-2003 -- MBCS Builds, Double Byte Charsknight_zhuge 29-Jan-2003 The internal x_TextToDoc function fails to support double-byte characters. This failure occurs when _MBCS is defined for the build and you add double-byte characters to your document (i.e. it does not occur in regular ASCII or UTF-8). For example, if the paramater szText is 3 GB2312 Chinese characters (hex D6 D0 B9 FA C8 CB) or 6 bytes, after...

firstobject XML Messaging Release 1.3 07-Jan-2003 -- The firstobject XML Messaging has been expanded dramatically and all of the classes have been greatly improved. Here is a list of the most obvious fixes and improvements:

CThread Release 3 07-Jan-2003 -- This third release only adds the IsExit method. The article has been expanded and it recommends a different way of implementing the main thread function in the class that uses it. See the CThread Class article for the details.

Paths In CMarkup 20-Nov-2002 updated 12-Feb-2006 -- Although you can navigate to any position in CMarkup without paths, paths greatly accelerate navigation of the document. Update July 12, 2005: Release 8.0GetElemPathFebruary 12, 2006: Release 8.2[@attrib='value']We will use the following sample document for discussion of paths. Absolute Path If the path starts with a single slash it means start at the root of the document and the first tag name...

6.4 Bug: Add Subdocument With PI 18-Oct-2002 -- Add or Insert SubDocTony Nancarrow 18-Oct-2002 I have discovered what appears to be a bug in x_AddSubDoc (called from AddSubDoc, InsertSubDoc, AddChildSubDoc and InsertChildSubDoc). If the document to be added or inserted to the parent document contains a processing instruction such as: <?xml version="1.0"?> then the software gets stuck inside an infinite loop within x_AddSubDoc. The problem...

GetElemIndex Method 07-Oct-2002 updated 14-May-2007 -- GetElemIndex returns the current main position element's internal index. If there is no current main position, it returns 0. See ElemIndex Navigation for the full story on all the ElemIndex methods. This index can be specified in the GotoElemIndex, GotoChildElemIndex and GotoParentElemIndex methods. In addition to GetElemIndex, there are GetChildElemIndex and GetParentElemIndex methods. The...

InsertSubDoc Method 07-Oct-2002 updated 14-May-2007 -- Similar to the AddSubDoc method, the InsertSubDoc method is called to insert a markup string subdocument under the current parent position. The subdocument is inserted before the main position or as the first child of the parent position if there is no main position. After the subdocument is successfully inserted, the main position points to the containing element of the new subdocument. The...

CMarkup Release 6.4 07-Oct-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.

GotoElemIndex Method 07-Oct-2002 updated 14-May-2007 -- GotoElemIndex sets the current main position to the element at the specified index. See ElemIndex Navigation for the full story on all the ElemIndex methods. Element indexes can be retrieved with GetElemIndex, GetChildElemIndex and GetParentElemIndex. In addition to GotoElemIndex, there are GotoChildElemIndex and GotoParentElemIndex methods. The ElemIndex functions provide access to the internal...

firstobject XML Editor Release 1.0 07-Oct-2002 -- The first release of this Editor supports large documents, XML formatting, UTF-8 viewing and a tree view, on Windows 95 and later Windows operating systems. Known issues are lack of support for tab characters and missing common editor functions like search and replace.

CDataEdit Class 07-Oct-2002 updated 27-Sep-2004 -- CDataEditCWndCDataEditrelease notes To use CDataEdit in your Visual Studio MFC project, just add DataEdit.cpp and DataEdit.h. Put a CDataEdit member variable in a parent window class such as a dialog or view. Note that CDataEdit is not derived from MFC CEdit and does not support CEdit methods. Here are some of the CDataEdit public methods: When a document is loaded, the carriage return and...

AddSubDoc Method 07-Oct-2002 updated 14-May-2007 -- The AddSubDoc method is called to add a markup string subdocument after the main position element. If there is no main position, the subdocument is added after the last element under the current parent position. After the subdocument is successfully added, the main position points to the containing element of the new subdocument. The method returns true if the subdocument is well-formed and added...

GetSubDoc Method 07-Oct-2002 updated 14-May-2007 -- The GetSubDoc method returns the main position element and any elements it contains as an XML document markup string. It is like GetDoc because the returned string is an XML document of its own. It is different from GetData, which only gets the data content and no child elements. The GetSubDoc method returns an XML document in which the root element was the main position element in the source...

firstobject XML Editor 07-Oct-2002 updated 22-Feb-2008 -- Features Parse, format, indent, large documents, no Java and no MSXML dependency! Works with incomplete XML documents, logs, and with HTML. The firstobject XML Editor freeware edition for Windows provides high performance text editing and parsing of text files. This release is built on CMarkup 8.3 technology to provide light and fast parsing without dependence on external components. The Editor...

6.3 Bug: Windows CE DecodeBase64 24-May-2002 -- UNICODE DecodeBase64Eric Mathieu 24-May-2002 DecodeBase64 is not working in the Windows CE (_UNICODE build) of CMarkup.

XML Links 12-Apr-2002 updated 01-Feb-2006 -- Specifications XML - The XML 1.0 W3C Recommendation is where all the fuss starts. This is a document that explains the details of XML, and it is the authority. See also Tim Bray's Annotated XML Specification. DOM - This is the W3C Recommendation for the Document Object Model which is the established method of in-memory XML manipulation on which major industry component APIs are based....

InsertNode Method 02-Apr-2002 updated 14-May-2007 -- The InsertNode method is called to add a node before the main position. If there is no main position, the node is added as the first node under the current parent position element. After a node is successfully inserted, the main position points to the new node. The following example shows how to insert an XML version (XML Declaration) at the beginning of an existing document with a root element....

AddNode Method 02-Apr-2002 updated 14-May-2007 -- The AddNode method is called to add a node after the main position. If there is no main position, the node is added as the last node under the current parent position element. After a node is successfully added, the main position points to the new node. The szText argument has a different purpose for the different types of nodes. For a Comment, this text is the text of the comment; for a Document...

GetNodeType Method 02-Apr-2002 updated 14-May-2007 -- This method returns the node type of the current main position node. If there is no main position, it returns 0. Since FindNode returns the node type, GetNodeType is mainly useful if you need to determine the node type of the current main position at a later time. See the FindNode section for the list of node types. See the Node Methods in CMarkup.

CMarkup Release 6.3 02-Apr-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,...

When CMarkup Load Returns false 02-Apr-2002 updated 05-Dec-2004 -- In CMarkup, when the Load method returns false, it is either because it could not load the file, or the data was not well-formed XML. Quite a number of I/O things might have gone wrong. You can check if GetDoc() returns a non-empty string because if it does then you know the file was loaded but the parser encountered an error. Call GetError() to get a parser error string. April 18, 2004 Update. In...

Navigating Levels in CMarkup 02-Apr-2002 updated 03-Jun-2007 -- XML supports hierarchical information much like what is known as a "tree" in computer jargon. This is by virtue of the XML element which can contain elements which can contain elements and so on. In the XML Specification, an element that is contained by another element is a "child" of that element. The element containing an element is the "parent" of that element. CMarkup tracks a current...

FindNode Method 02-Apr-2002 updated 14-May-2007 -- FindNode moves the current main position to the next node (whether or not it is an element). The FindNode method works together with the element navigation methods, to provide access to nodes under the current parent element position in the document. Elements are nodes too, so you can use FindNode instead of FindElem to locate elements plus other kinds of nodes. This table shows the node types: ...

Node Methods in CMarkup 02-Apr-2002 updated 12-Jul-2005 -- Update July 12, 2005: With CMarkup release 8.0, the node methods have been made available in the evaluation version so that everyone can try the full HTML and generic markup capabilities of CMarkup. Node methods are key to providing access to mixed content as well as Other Markup (non-XML). The node methods are FindNode, AddNode, InsertNode, RemoveNode, and GetNodeType, and in addition the...

RemoveNode Method 02-Apr-2002 updated 14-May-2007 -- RemoveNode removes the node at the current main position. If there is no main position to remove, it returns false and does not modify the CMarkup object. Upon removal, the main position becomes that of the previous node or it results in no main position if the removed node was the first child of its parent. See the Node Methods in CMarkup.

ResetMainPos Method 02-Apr-2002 updated 14-May-2007 -- The ResetMainPos method clears the current main position and child position, without affecting the current parent position. This is different from ResetPos which completely clears the current position. ResetMainPos is used to restart a loop through sibling elements under the same parent position within the document. It also allows you to insert an element as the first child of the parent position...

6.2 Bug: OutOfElem Level Wrong 14-Mar-2002 -- FindChildElem and the level trackerJonnie White 14-Mar-2002 If I look for a child element using FindChildElem("/root/list/thing"), I find the right element. The main position is moved to list, and the child position to thing. The level counter doesn't change though: m_Doc.ResetPos(); m_Doc.FindChildElem("/root/list/thing"); // main pos is list, child pos is thing, level is 0! // if I then try to...

6.2 Bug: CFileException Memory Leak 20-Feb-2002 -- Load/Save Exception Memory LeakNikolay Sokratov 20-Feb-2002 Bug: everywhere you use CFileException * don't forget to delete it. That will fix memory leak caused by the exception not being deleted. catch (CFileException*e) { e->Delete(); return FALSE; }

CMarkup for Delphi 01-Feb-2002 -- Here is a Delphi version of CMarkup release 5.3 ported by Shawn Oster. Just add SimpleMap.pas and XMLMarkup.pas to your project. We are working on ports of current Evaluation and Developer versions, but for the time being the 5.3-based version has proven useful to Delphi developers so here it is. DelphiMarkup53.zip (26 Mar 2001) 13k The CMarkup Evaluation License Agreement applies to Delphi...

6.2 Issue: Windows CE Compiling 15-Jan-2002 -- CMarkup on Windows CEReto Bucher 15-Jan-2002 First, Exceptions are not supported under WinCE (File Handling) and second, two Macros do not exist under CE (_tclen, _tccpy)

CMarkup FAQ 14-Jan-2002 updated 12-Jul-2005 -- What is Different in the Developer Version? Compared to the Evaluation Version of CMarkup, the Developer Version has additional features and methods. See CMarkup Developer. What is the Advanced Developer License? The Advanced Developer License packages several MFC source code components with the CMarkup Developer License. See Advanced CMarkup Developer. Borland C++, Linux G++, Mingw, GCC? Yes,...

CBuffer Class 14-Jan-2002 -- The CBuffer class provides a combination of easy thread-safe buffer and string methods that make it convenient in many situations. It is used to package messages with the CSock Class, whether the payload is binary or text. CBuffer uses internal reference counting to support passing it around and copying it efficiently, like the MFC CString does. In other words, you can pass it to a function by...

CSock Class 14-Jan-2002 -- The CSock class provides synchronous send and receive of a buffer, plus ping and resolve address. The class encapsulates a listener thread which you can start and stop. CSockasynchronousCSockCSockCBuffer ClassSend Call Send(csAddress,bufMessage) to send the message to the specified TCP/IP address. The address can be of the internet address form "255.255.255.255", the name of the computer on the...

firstobject XML Messaging Release 1.2 14-Jan-2002 -- The TCP/IP CSock Class has been added, with a couple of demo setups to demonstrate the Buyer Seller conversations over the network. The new CNodeSpyDlg class allows you to watch the messages sent and received in the node. See the firstobject XML Messaging article for full details.

CThread Release 2 14-Jan-2002 -- In this release the Run method has been renamed to Main. This change was made to avoid conflict and confusion with the Run method of MFC CWinThread in other versions of CThread which may be released later. While you always override the CThread Main method, you rarely override the MFC CWinThread Run method because it works differently.

Navigating and Getting Information From a Document 02-Jan-2002 updated 06-Jan-2006 -- FindElem and FindChildElem only search forward. You have to call ResetMainPos or ResetChildPos if you don't know the order of the siblings and/or don't want to process sequentially. For example, you would call ResetChildPos after finding child element CHILD3 before finding child element CHILD1. If you didn't know the order you could call ResetChildPos before every FindChildElem, or loop through...

Debugging With CMarkup 20-Nov-2001 -- Have you ever been debugging code that uses CMarkup and wonder where the current position or child position is? As of CMarkup 6.2, there is a debugging feature in CMarkup exposing these positions in debug mode. It works by maintaining debug state member string pointers spying into the document at the start tag of the particular element. As you step through your code you can watch where the current...

CMarkup Release 6.2 01-Nov-2001 -- This release speeds up name comparisons and adds a debugging aid.

FindGetData Method 01-Nov-2001 updated 14-May-2007 -- The FindGetData method combines the FindElem method with the GetData method. It finds the element, sets that element as the main position element, and returns its string data value. If the element is not found or is empty, it returns an empty string. If the element is found, it is set as the current main position whether or not it is an empty element. If this main position element contains child...

firstobject XML Messaging Release 1.1 01-Nov-2001 -- This release of the XML Messaging Architecture project fixes a multithreading bug in demo 2, and takes advantage of the new FindSetData and FindGetData methods in CMarkup.

FindSetData Method 01-Nov-2001 updated 14-May-2007 -- The FindSetData method combines FindElem and SetData into one convenient method, plus in release 9.0 it will create the element if it doesn't exist. It finds or creates the element, sets that element as the main position element, and replaces the new main position element's contents with the szData string data value. This will remove any child elements of the main position element if any. It...

The Versatile Way to Program XML 07-Oct-2001 -- CMarkup avoids the aspects of XML that are complex and prone to incompatibility and dispute. As mentioned in the EDOM Specification Draft, the EDOM methods cut to the core functionality of XML files and strings. If you are a programmer, you probably understand the potential of encapsulating an XML string with simple tree-like methods that go to the next sibling or child and create them. Simple...

Using MSXML 3.0 with CMarkupMSXML 02-Oct-2001 updated 11-Jun-2005 -- XPath and other functionality available in MSXML 3.0 is available in CMarkupMSXML which prior to release 6.2 only used the first release of MSXML. To get MSXML 3.0 functionality, download CMarkup release 6.2 or later (the special 6.11 release of CMarkupMSXML is included in both CMarkup 6.2 evaluation and developer versions), and read the following directions: Add MARKUP_MSXML3 to your Project...

What Stops You From Using XML 19-Sep-2001 -- You may think you have to learn about DTDs and XML Schema to use XML in your programs, but this could not be further from the truth. Plain old XML is a powerful way to represent configuration information, interprocess messages, and commercial data. To spec out how the XML document is organized, use a sample XML document and write notes about any requirements for the elements and attributes. A...

firstobject XML Messaging 16-Sep-2001 updated 07-Jan-2003 -- Message13.zip 125k (exe only) release notes This release of the firstobject Messaging Architecture provides a Windows TCP/IP asynchronous messaging framework in MFC and illustrates a business process in an animated multithreaded demonstration. You can try it out without any setup or configuration, just run the message program and type demo to see the demonstration. What Is Asynchronous...

firstobject XML Messaging Release 1.0 16-Sep-2001 -- The Messaging Architecture project showcases the potential of XML messaging in business to business transactions. The animated demo illustrates buyer and seller business agents.

GetError Method 01-Aug-2001 updated 14-May-2007 -- GetError is called after SetDoc, Load, or Save to get the file I/O or parsing error string.

RemoveAttrib Method 01-Aug-2001 updated 14-May-2007 -- Call RemoveAttrib to remove the attribute named szAttrib in the main position element (or processing instruction). The method returns false if there is no main position element or attribute by this name. See also SetAttrib and RemoveChildAttrib.

RemoveChildAttrib Method 01-Aug-2001 updated 14-May-2007 -- Call RemoveChildAttrib to remove the attribute named szAttrib in the child position element. The method returns false if there is no child position or attribute by this name. See also the SetChildAttrib and RemoveAttrib methods.

IsWellFormed Method 01-Aug-2001 updated 14-May-2007 -- You may need to determine if the CMarkup object contains a well-formed XML document at a later point than the call to SetDoc such as in a situation where the object has been passed to a function in your program and you don't know if it contains a well-formed XML document. Simply call IsWellFormed which returns true if the CMarkup object contains a well-formed document. Here is an example of an...

Load Method 01-Aug-2001 updated 14-May-2007 -- Call Load to read the document from a file. For example: It returns true if the file is successfully loaded and determined to be well-formed as explained in the SetDoc method. If the file is not accessible or empty then the CMarkup object is empty. If the read is successful, the CMarkup object contains the content of the file whether or not it is well-formed. If Load returns false, the error...

CMarkup Release 6.1 01-Aug-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.

Save Method 01-Aug-2001 updated 14-May-2007 -- Call Save to write the document to file. For example: It will overwrite the file if it exists and create it if it does not. It returns true if the file was successfully written. As explained for the Load and SetDoc methods, the document is written as it exists in the CMarkup object even if it was loaded from a string or file that was not well-formed XML. If Save returns false, the error string...

CMarkup Evaluation License Agreement 01-Aug-2001 -- Carefully read the following license agreement. By using this product, you are consenting to be bound by and are becoming a party to this agreement. If you do not agree to all of the terms of this agreement, do not use CMarkup. The CMarkup product contains source code ("Software") which refers to all the source code classes and components in the CMarkup product downloads. "Software" includes any...

CMarkup STL Platforms 22-Jul-2001 updated 01-Apr-2007 -- Update April 1, 2007: Although CMarkup was originally written in Visual C++ with CString, STL string is increasingly important. CMarkup release 9.0 unifies the CMarkup and CMarkupSTL classes (see Unified CMarkup for STL and MFC) and paves the way for STL string to take its place at the forefront of CMarkup usage! Another useful development in Release 9.0 is the ability to pass STL string...

DecodeBase64 Method 09-Jul-2001 updated 14-May-2007 -- Base64 is a way of encoding a binary value into an ASCII text value that will not interfere with markup tags (see How To Handle Binary Data). Use the EncodeBase64 method to go from binary to Base64 text and use this DecodeBase64 method to go from Base64 text to binary. In DecodeBase64, the strBase64 argument is the Base64 string, pBuffer points to a buffer which will receive the binary data, and...

CMarkup Release 6.0 09-Jul-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.

EncodeBase64 Method 09-Jul-2001 updated 14-May-2007 -- Base64 is a way of encoding a binary value into an ASCII text value that will not interfere with markup tags (see How To Handle Binary Data). Use this EncodeBase64 method to go from binary to Base64 text and use the DecodeBase64 method to go from Base64 text to binary. In EncodeBase64, the pBuffer argument points to binary data, and nBufferLen is the length in bytes of that data. Add binary data...

UTF-8 in CMarkup and CDataEdit 29-Jun-2001 updated 31-Mar-2003 -- UTF-8 (RFC 3629) is the standard for XML and it is widely used in web-enabled applications. It is a multi-byte system for encoding Unicode that uses from 1 to 6 bytes per character. A regular ASCII file (with character codes under 128) is a valid UTF-8 file so you need not worry about UTF-8 support if your XML stays within this limitation. Most text in Western software is compatible with UTF-8...

CMarkup Release 5.7 29-Jun-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...

CMarkup Release 5.6 01-Jun-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.

CMarkup Release 5.5 13-Apr-2001 -- The heretofore missing Set/GetData methods are now included, and subdocument support is now in STL and MSXML versions.

How Compliant is CMarkup with XML? 04-Apr-2001 updated 02-Jun-2005 -- CMarkup processes parses and creates well-formed XML quickly, reliably, and with a small footprint. The parts of XML that it does not support are the parts that are not needed for datainterchange via elements. Many XML interchanges are undertaken in situations where the producer and consumer of the XML documents are well-known (often with the same developer at both ends of the conversation). In...

CMarkup Release 5.4 04-Apr-2001 -- This includes a lot of important fixes and code enhancements.

How To Handle Binary Data 04-Apr-2001 updated 16-May-2007 -- Encode your binary data using Base64 or bin.hex, which both produce a string. Then pass this string into the data of your element with either the SetData or AddElem method. Make sure the producer and consumer of your XML know how to encode and decode it respectively. Here is an example of an element that contains binary data encoded in Base64 and uses an attribute to indicate the type of...

Standard Special Characters 04-Apr-2001 -- CMarkup escapes and unescapes (encodes and decodes) five special chars: the ampersand, double and single quotes, less than and greater than signs. The ampersand is important because it is the escape character used to encode special characters. The XML specification allows single quoted and double quoted attribute values and CMarkup uses double quotes to quote attribute values. Prior to release...

CMarkup Performance Tests 04-Apr-2001 updated 03-Apr-2006 -- Release 7.0 Tests, July 17, 2004 There is a 25% jump in performance from 6.6 to 7.0 due to the new node parsing function. The improvement on large documents from 6.5 to 6.6 was due to the new segmented index array introduced in release 6.6. Also note that the string reference version of SetDoc available in 7.0 is a significant benefit because it eliminates underlying string length and memory...

CMarkup Has Advantages Over MSXML 04-Apr-2001 -- MSXML Wrapper CMarkupMSXMLEase of use: CMarkup complies with EDOM, the key to simple XML processing. EDOM is an easy and concise set of XML methods for parsing, creating and modifying XML documents. MSXML is based on DOM which is a large and complex specification with at least 15 types of objects and numerous interfaces (see EDOM vs DOM and Alternatives). With MSXML in C++ you have to learn the...

CMarkup Release 5.3 23-Mar-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.

CMarkup Release 5.2 20-Mar-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.

SavePos Method 07-Mar-2001 updated 14-May-2007 -- 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. You can return to a saved position with the RestorePos method. For example, after navigating to the position in the document of an...

CMarkup Release 5.1 07-Mar-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.

RestorePos Method 07-Mar-2001 updated 14-May-2007 -- Call RestorePos to return to a position previously saved with the SavePos method. The current position consists of the parent, main and child positions. The RestorePos method returns false if there is no saved position by the name szPosName. When you resume navigating at the restored position, both the main position and the child position will be where they were when they were saved. In the...

GetAttribName Method 07-Mar-2001 updated 14-May-2007 -- Call GetAttribName to get the attribute name of the zero-based nth attribute of the main position element. If there is no current position, it returns an empty string regardless of n. If the child position element has no nth attribute, it returns an empty string. This is used to query the attributes that an element has. You can loop through beginning at n=0 and incrementing n until it returns an...

CMarkup Release 5 and Previous Releases 11-Feb-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...

Keep XML Simple 02-Feb-2001 -- Many software developers who are not too familiar with XML assume that it is a huge and complex technology. XML itself is actually very simple, it is all the tools and specifications that have grown up around it that are complex.

EDOM vs DOM and Alternatives 30-Oct-2000 -- In the movement to use XML in everyday programs, we look to our various choices. The Microsoft.XMLDOM service is available on most Windows platforms and it implements the Document Object Model. Numerous commercial products support XML parsing and other XML processing. This section briefly discusses DOM and these other alternatives. The Document Object Model (DOM) is a specification for...

GetChildAttrib Method 30-Oct-2000 updated 14-May-2007 -- Call GetChildAttrib to get the string value of the attribute named szAttrib in the child position element. If there is no current child position, it returns an empty string. If the child position element has no attribute by the name of sAttribName, it returns an empty string. This returns the same string passed to the SetChildAttrib method even if Standard Special Characters are encoded in the...

SetAttrib Method 30-Oct-2000 updated 14-May-2007 -- Calling SetAttrib adds or changes the attribute named szAttrib in the main position element to have the specified value. If the attribute already exists for the main position element, the value is changed. Otherwise the attribute and its value are added. The method returns false if there is no main position element. SetAttrib also works when the main position is a processing instruction node. See...

SetChildAttrib Method 30-Oct-2000 updated 14-May-2007 -- Calling SetChildAttrib adds or changes the attribute named szAttrib in the child position element to have the specified value. If the attribute already exists for the child position element, the value is changed. Otherwise the attribute and its value are added. The method returns false if there is no child position element. The AddChildAttrib method is no longer used and was the same as...

SetChildData Method 30-Oct-2000 updated 14-May-2007 -- Call SetChildData to replace the child position element's contents with the szData string value. This will remove any child elements of the child position element if any. It returns false if there is no child position. As with SetData, the MNF_WITHCDATA and MNF_WITHREFS flags can be used to affect how the data value is stored. As explained in more detail for SetData, with the MNF_WITHCDATA flag...

SetData Method 30-Oct-2000 updated 14-May-2007 -- Call SetData to replace the main position element's contents with szData. This will remove any child elements of the main position element if any. It returns false if there is no main position. See the GetData method for details on the data value for nodes other than elements. The following example shows the result of calling SetData("n&lt6") when the main position is the EQUATION element. The...

SetDoc Method 30-Oct-2000 updated 14-May-2007 -- The SetDoc method parses a string containing an XML document. Do not pass a filename to this method (see Load for that). For example: The newly populated CMarkup object has no current position; i.e. the position is logically before the beginning of the document. In this state, calling FindElem() would find the first element (the root element) in the document and FindNode() would find the first...

GetChildData Method 30-Oct-2000 updated 14-May-2007 -- The GetChildData method returns the string data value of the child position element. It returns an empty string if there is no data, or there is no child position, or the child position element contains descendants. As with GetData, the data value will be combined from a CDATA Section or even multiple CDATA Sections and text nodes.

AddChildElem Method 30-Oct-2000 updated 14-May-2007 -- The AddChildElem method is called to add a child element after the child position (see InsertChildElem to put it before the child position). If there is no child position, the element is added as the last child element of the main position regardless of whether there are any child elements. Only call this method if there is a main position. After a child element is successfully added, the child...

InsertChildElem Method 30-Oct-2000 updated 14-May-2007 -- The InsertChildElem method inserts the element before the current child position (see AddChildElem to put it after the child position). If there is no child position, the element is inserted as the first child element of the main position regardless of whether there are any child elements. Only call this method if there is at least a main position. After a child element is successfully added, the...

AddElem Method 30-Oct-2000 updated 14-May-2007 -- The AddElem method is called to add an element after the main position (see InsertElem to put it before the main position). This should be the first method used on the newly instantiated CMarkup object to create the root element. After calling IntoElem you can add an element inside the root element. You can also use it inside the document to add elements under the current parent position. If...

InsertElem Method 30-Oct-2000 updated 14-May-2007 -- The InsertElem method is called to add an element before the main position (see AddElem to put it after the main position). If there is no main position, the element is added as the first element under the current parent position. After an element is successfully inserted, the main position points to the new element and there is no child position. The data value is optional. If no data value or...

OutOfElem Method 30-Oct-2000 updated 14-May-2007 -- 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. See Navigating Levels in CMarkup. If the main position is the file element, calling...

EDOM 30-Oct-2000 updated 14-May-2007 -- Please see the CMarkup Methods for the full CMarkup API. EDOM is described here as an overview of the original programming interface design behind CMarkup. The gist of EDOM is that the XML document and a current position are encapsulated in one object, and there is only one object. EDOM is the key to simple XML processing. With EDOM you can avoid the complexities of DOM, SAX, DTD, Schema and XSL...

GetChildTagName Method 30-Oct-2000 updated 14-May-2007 -- This method returns the tag name of the current child position element. If there is no child position, it returns an empty string. So when you call FindChildElem() without an argument, you can call this diagnostic method to determine the tag name of the child element. That allows you to loop through the child elements of an element and act according to their tag names.

GetData Method 30-Oct-2000 updated 14-May-2007 -- The GetData method returns the string data value of the main position element or node. It returns an empty string if there is no data value, or there is no current position, or the main position element contains child elements. To get the markup string content of the main position element, see the GetElemContent method. To get the markup string subdocument rooted in the main position element see...

IntoElem Method 30-Oct-2000 updated 14-May-2007 -- IntoElem makes the main position element the parent element. If there is no main position it returns false and does not affect the current position at all. Here is an example document with 3 levels, a config element which contains a diagnostics element which contains a file element: Here is the simplest way to navigate to the file element: There are other ways of getting there such as: See...

Introduction to XML 30-Oct-2000 updated 06-Jun-2005 -- XML is described in full in the W3C XML Specification but that is not something you want to read for fun. I recommend a great article Beginning XML - Chapter 2: Well-Formed XML on The Code Project, and here are some XML Links. The goal of firstobject is to skip to the essentials and not get embroiled in any details that will delay the adoption of XML in your software development. A simple XML...

Example Shopping List 30-Oct-2000 updated 06-Jun-2005 -- This section discusses the usage of various methods by applying several code snippets to a sample document object. The document above could be created using the following code: You can navigate to the PRICE child element in the first ITEM element as follows: Now that the child position is the PRICE element, doc.GetChildTagName() returns PRICE, doc.GetChildData() returns .98, and...

GetDoc Method 30-Oct-2000 updated 14-May-2007 -- The GetDoc method can be used at any time to get the full text of the CMarkup object XML document. For example: The document and current position are not affected by this call. It is generally used after creating or modifying the document when it is time to transport or save the document. As explained for the Load and SetDoc methods, the document is retrieved as it exists in the CMarkup object...

GetTagName Method 30-Oct-2000 updated 14-May-2007 -- The GetTagName method returns the tag name of the current main position element. If there is no current position, it returns an empty string. So when you call FindElem() without an argument, you can call this diagnostic method to determine the tag name of the current element. That allows you to loop through a set of sibling elements and act according to the elements you encounter.

RemoveChildElem Method 30-Oct-2000 updated 14-May-2007 -- RemoveChildElem is like RemoveElem, but it deletes the element at the current child position (and all its content if any). If there is no child position to delete, the method returns false and does not modify the CMarkup object. Upon removal, the child position becomes that of the previous child element or none (no child position) if the removed element was the first child of the main position...

RemoveElem Method 30-Oct-2000 updated 14-May-2007 -- When RemoveElem is used the element at the current main position (and all its child elements if any) is removed from the document. If there is no main position to remove, the method returns false and does not modify the CMarkup object. Upon removal, the main position goes to the previous element or none (no main position) if the removed element was the first child of its parent. The fact that the...

FindChildElem Method 30-Oct-2000 updated 14-May-2007 -- Using the child position can save you some lines of code in navigating the document when you are using both the main position and child position and do not want to do an extra IntoElem and OutOfElem to go between them. But keep in mind that this is an optional means of navigation. See Navigating and Getting Information From a Document and Navigating Levels in CMarkup to learn about the CMarkup...

ResetChildPos Method 30-Oct-2000 updated 14-May-2007 -- The ResetChildPos method clears the current child position only, without affecting the main position. This is used to restart a loop through child elements while holding the same main position within the document. It also allows you to add an element as the first child of the main position element when you call InsertChildElem(), or restart a search through child elements. In this sample...

GetAttrib Method 30-Oct-2000 updated 14-May-2007 -- Call GetAttrib to get the string value of the attribute named szAttrib in the main position element. If there is no current position, it returns an empty string. If the main position element has no attribute by the name of sAttribName, it returns an empty string. This returns the same string passed to the SetAttrib method even if Standard Special Characters are encoded in the markup document...

ResetPos Method 30-Oct-2000 updated 14-May-2007 -- The ResetPos method clears the current position so that there is no current main position or child position and the current parent position is reset to the top of the document. This is used before navigating into the document to start back at the beginning when it doesn't matter where previous operations had placed the current position. To selectively clear the main or child position, see...

FindElem Method 30-Oct-2000 updated 14-May-2007 -- The FindElem should be thought of as "FindNextElem" because it goes forward from the current main position to the next sibling element. If there is no next sibling element it returns false and leaves the main position where it was. In the following example, if there is no current position (when the document is loaded or after calling ResetPos), calling FindElem() will set the main position to the...

CMarkup 16-May-1999 updated 01-Apr-2007 -- Terms: CMarkup Evaluation License Agreement Download: Markup90.zip 449k release notes Create new XML documents; parse and modify existing XML documents. All from the methods of one simple class utilizing MFC or STL strings. With CMarkup you can run the example right out of the zip file, look through its source code if you like, and compile XML capability into your own application in minutes. ...

CThread Class 16-May-1999 updated 25-Nov-2003 -- Thread4.zip 3k release notes This class makes it easier to use threads in an object oriented program. The difficulty with threads in object oriented design is that you have to provide a global static function as an entry point for the new thread. There are many classes available that provide answers to this problem, but CThread is a light and simple solution in MFC. CThread is used in the...

CThread Release 1 16-May-1999 -- A number of thin thread classes have been made available through other forums. Here is a class which is easy to declare inside of any class that uses it. It only requires the implementation of one simple function.

 

 
 

©Copyright 2008 First Objective Software, Inc. All rights reserved.