SourcePro Core : XML Streams Module User’s Guide : Enhanced Streams : The Difference Between Enhanced Streams and Basic Streams
The Difference Between Enhanced Streams and Basic Streams
Enhanced XML streams differ from the basic XML streams in several important ways.
First, the input processor for enhanced XML streams is a true XML parser with full support for namespaces and no restrictions regarding ordering of elements or attributes. The enhanced XML input stream uses tag names to locate elements rather than position, as does the basic XML stream. For this reason, the parser tolerates missing and unordered elements. The input stream parses each level of an XML document fully and then pulls appropriate data using an element's tag name. Using this approach, missing or extra elements have no adverse affect, and elements no longer need to be ordered. All of this results in a more forgiving and robust processor.
Next, the enhanced XML output stream also produces a far more natural-looking XML document. Rather than translating every C++ object into a single restricted schema, the enhanced XML streams produce documents tailored to each class. Each class therefore matches a particular schema.
The example in the following section illustrates these differences.