![](resources/join.gif)
![Home](graphics/ext-2-label-3.jpg)
![](resources/separator.gif)
![Readme](graphics/index-label-3.jpg)
![Charter](graphics/charter-label-3.jpg)
![Release Info](graphics/releases-label-3.jpg)
![](resources/separator.gif)
![Installation](graphics/install-label-3.jpg)
![Download](graphics/ext-20-label-3.jpg)
![Build Instructions](graphics/build-label-3.jpg)
![](resources/separator.gif)
![FAQs](graphics/faqs-label-3.jpg)
![Samples](graphics/samples-label-3.jpg)
![API Docs](graphics/api-label-3.jpg)
![](resources/separator.gif)
![DOM C++ Binding](graphics/ext-70-label-3.jpg)
![Programming](graphics/program-label-3.jpg)
![Migration Guide](graphics/migrate-label-3.jpg)
![](resources/separator.gif)
![Feedback](graphics/feedback-label-3.jpg)
![Bug-Reporting](graphics/bug-report-label-3.jpg)
![PDF Document](graphics/pdf-label-3.jpg)
![](resources/separator.gif)
![Source Repository](graphics/ext-102-label-3.jpg)
![User Mail Archive](graphics/ext-104-label-3.jpg)
![Devel Mail Archive](graphics/ext-106-label-3.jpg)
![](resources/close.gif)
|
![](resources/void.gif) | ![](resources/void.gif) | ![](resources/void.gif) | ![](resources/void.gif) | Migrating to earlier Releases | ![](resources/void.gif) | ![](resources/void.gif) | ![](resources/void.gif) | ![](resources/void.gif) |
| |
|
![](resources/void.gif) | ![](resources/void.gif) | ![](resources/void.gif) | ![](resources/void.gif) | Migrating from Xerces-C++ 2.5.0 to Xerces-C++ 2.6.0 | ![](resources/void.gif) | ![](resources/void.gif) | ![](resources/void.gif) | ![](resources/void.gif) |
| |
The following section is a discussion of the technical differences between
Xerces-C++ 2.5.0 code base and the Xerces-C++ 2.6.0.
Topics discussed are:
- New features in Xerces-C++ 2.6.0
- Public API Changes
- New Public API
- Modified Public API
- Deprecated/Removed Public API
- Please note the following source code incompatibility: Rename VALUE_CONSTRAINT enumeration values in XSConstants.hpp due to conflict with system header. New
values are VALUE_CONSTRAINT_NONE, VALUE_CONSTRAINT_DEFAULT and VALUE_CONSTRAINT_FIXED. Old
values are VC_NONE, VC_DEFAULT and VC_FIXED.
- Also note that if you have implemented your own XMLGrammarPool implementation, that
the original getXSModel has been marked deprecated and a new method, of the same
name, that takes a bool parameter has been added. This new getXSModel needs
to always return an XSModel.
![](resources/void.gif) | ![](resources/void.gif) | ![](resources/void.gif) | ![](resources/void.gif) | New features in Xerces-C++ 2.6.0 | ![](resources/void.gif) | ![](resources/void.gif) | ![](resources/void.gif) | ![](resources/void.gif) |
| |
- Reduce footprint of DLL by building the deprecated DOM as a separate library
- Improve packaging scripts
- Enable ID's to work on all kinds of schema components
- Add messages to DOMExceptions along with the error code
- Improve annotation error-reporting capabilities
- Make grammar caching work with DTD internal subsets
- Bring parser up to the XML 1.0 3rd Edition
- Update to the XML 1.1 recommendation
- Add new method to DOMDocument so that DOM level-2 style DOMDocumentTypes (which have a
DOMDocument to own them) can be created
- Feature for disabling identity constraints
- Update schema errata
- Provide means to get actual values out of PSVI/schema component model
- Synthesize annotation components for non-schema attributes
- Expose partial PSVIElement information at the start element call
- Externalize validation, actual/canonical value production for arbitrary strings
- Laxly validate schema annotations
- Upgrade to ICU 3.0
- Handle elements with a large number of attributes more efficiently
|
| |
The following lists the public API changes between the Xerces-C++
2.5.0; and the Xerces-C++ 2.6.0 releases
of the parser.
| |
- XSValue
- IdentityConstraintHandler
- XMLBufferFullHandler
- XMLString: removeChar, isValidNOTATION
- XMLUri: normalizeUri
- PSVIHandler: handlePartialElementPSVI
- RefHash family of classes: getHashModulus
- XSAnnotation: setline/col and systemid
- XMLReader: handeEOL
- XMLChar: isValidNmToken
- XMLBigDecimal: parseDecimal, getIntVal
- HexBin: getCanonicalRepresentation, decode
- Base64: getCanonicalRepresentation, decode
- XMLBigInteger: compareValues
- XMLAbstractDoubleFloat: isDataConverted, getValue, isDataOverFlowed
- PSVIItem: getActualValue
- XSSimpleTypeDefinition: getDatatypeValidator
- RefHash2KeysTableOf: transferElement
- XMLGrammarPool: getXSModel
|
| |
- XSerializeEngine constructor
- MACUnicodeConverters
|
![](resources/void.gif) | ![](resources/void.gif) | ![](resources/void.gif) | ![](resources/void.gif) | Deprecated/Removed Public API | ![](resources/void.gif) | ![](resources/void.gif) | ![](resources/void.gif) | ![](resources/void.gif) |
| |
- XSerializeEngine constructor
- DTDAttDef: getDOMTypeInfoName, getDOMTypeInfoUri
- DTDElementDecl: getDOMTypeInfoName, getDOMTypeInfoUri
- SchemaAttDef: setAnyDatatypeValidator
- UnionDatatypeValidator: getMemberTypeName, getMemberTypeUri, getMemberTypeAnonymous, getMemberTypeValidator
- XMLAttr: getValidatingTypeURI, getValidatingTypeName, setDatatypeValidator, setSchemaValidated
- ComplexTypeInfo: setContentModel
- XMLGrammarPool: getXSModel
- SAXParser, mark this class deprecated
|
|
|
![](resources/void.gif) | ![](resources/void.gif) | ![](resources/void.gif) | ![](resources/void.gif) | Migrating from Xerces-C++ 2.1.0 to Xerces-C++ 2.2.0 | ![](resources/void.gif) | ![](resources/void.gif) | ![](resources/void.gif) | ![](resources/void.gif) |
| |
The following section is a discussion of the technical differences between
Xerces-C++ 2.1.0 code base and the Xerces-C++ 2.2.0.
Topics discussed are:
![](resources/void.gif) | ![](resources/void.gif) | ![](resources/void.gif) | ![](resources/void.gif) | New features in Xerces-C++ 2.2.0 | ![](resources/void.gif) | ![](resources/void.gif) | ![](resources/void.gif) | ![](resources/void.gif) |
| |
- C++ Namespace Support
- Schema 1.0 Errata Implementation
- Experimental Implementation of XML 1.1
- More DOM L3 Core Support:
- DOMNode: baseURI
- DOMAttr: isId, getTypeInfo
- DOMElement: setIdAttribute, setIdAttributeNS, setIdAttributeNode, getTypeInfo
- DOM Message: make use of the non-standard extension DOMImplementation::loadDOMExceptionMsg
to load the default error text message for the correspond Exception Code.
- New feature XMLPlatformUtils::Initialize(const char* const locale) to set
the locale for message loader. See
Specify locale for Message Loader for details
- Support Build with ICU Message Loader, or Message Catalog Message Loader
- RPM for Linux
- 390: Uniconv390 support
- 390: support record-oriented MVS datasets with the DOM Level 3 serialization APIs
- Support for Linux/390
- Performance: Break Scanner for different functionalities and many other performance improvement
- New feature, "http://apache.org/xml/features/dom/byte-order-mark", allows user to enable
DOMWriter to write Byte-Order-Mark in the output XML stream,
See
Xercesc Feature: Byte Order Mark for details
|
| |
Xerces-C++ 2.2.0 now supports C++ Namespace. All Xerces-C++
classes, data and variables are defined in the xercesc namespace
if C++ Namespace support is ENABLED.
All the binary distributions of Xerces-C++ 2.2.0 are now built with
C++ Namespace enabled. Therefore users' applications that links with the distributed
binary packages must namespace qualify all the Xerces-C++ classes, data and variables.
See the Programming Guide Using C++ Namespace
for details.
|
| |
The following lists the public API changes between the Xerces-C++
2.1.0; and the Xerces-C++ 2.2.0 releases
of the parser.
| |
- To support additional DOM L3 functions, the following are added:
- DOMAttr: isId, getTypeInfo
- DOMElement: setIdAttribute, setIdAttributeNS, setIdAttributeNode, getTypeInfo
- Added DOMTypeInfo class for getTypeInfo class in DOMElement and DOMAttr
- Added getDOMTypeInfoUri, getDOMTypeInfoName to XMLAttDef and XMLElementDecl for use in building DOMTypeInfo
- Added a non-standard extension DOMImplementation::loadDOMExceptionMsg to load the
default error message for the corresponding DOMException code.
- XMLAttr: Added a constructor and a set method to allow creating/setting of
XMLAttr using a rawname.
- Added XMLUri::getUriText to return the URI as a string specification.
- Add XMLString::fixURI to transform an absolute path filename to standard URI form.
- Added XMLString::equals for faster string comparison.
- To allow users to tell the parser to force standard uri conformance,
the following are added:
- XercesDOMParser/DOMParser/SAXParser: get/setStandardUriConformant
- and DOMBuilder/SAX2XMLReader will recognize the feature
http://apache.org/xml/features/standard-uri-conformant
- Add XMLURL::hasInvalidChar() to indicate if the URL has invalid char as per RFC standard
- To allow users to enable/disable src offset calculation,
the following are added:
- XercesDOMParser/DOMParser/SAXParser: get/setCalculateSrcOfs
- and DOMBuilder/SAX2XMLReader will recognize the feature
http://apache.org/xml/features/calculate-src-ofst
- To allow users to select the scanner when scanning XML documents,
the following are added:
- XercesDOMParser/DOMParser/SAXParser: useScanner
- and DOMBuilder/SAX2XMLReader will recognize the property
http://apache.org/xml/properties/scannerName
- Added getSrcOffset to XercesDOMParser/DOMParser/SAXParser/DOMBuilder/SAX2XMLReader to
allow users to get the current src offset within the input source.
|
| |
- The following DOM functions are being added a const modifier.
- DOMImplementation::hasFeature
- DOMNode: isSameNode, isEqualNode, compareTreePosition
- XMLPlatformUtils::Initialize() takes a parameter specifying locale
for message loader, with default value "en_US".
- To fix [Bug 13641], the QName copy constructor is corrected to take
a reference as parameter, i.e. QName(const QName& qname).
- To fix [Bug 12232], the QName operator== has been added a const modified.
- Move XMLUri copy constructor and operator = as public.
- Move XMLUri::isURIString as public.
- For validation purpose, added two more default parameters to
XMLValidator::validateAttrValue.
- To fix [Bug 15802], the getURIText of DOMParser/XercesDOMParser/SAXParser/SAX2XMLReader
are being added a const modifier.
|
![](resources/void.gif) | ![](resources/void.gif) | ![](resources/void.gif) | ![](resources/void.gif) | Deprecated/Removed Public API | ![](resources/void.gif) | ![](resources/void.gif) | ![](resources/void.gif) | ![](resources/void.gif) |
| |
- No Deprecated Public API in this release.
|
|
|
![](resources/void.gif) | ![](resources/void.gif) | ![](resources/void.gif) | ![](resources/void.gif) | Migrating from Xerces-C++ 1.7.0 to Xerces-C++ 2.0.0 | ![](resources/void.gif) | ![](resources/void.gif) | ![](resources/void.gif) | ![](resources/void.gif) |
| |
The following section is a discussion of the technical differences between
Xerces-C++ 1.7.0 code base and the Xerces-C++ 2.0.0.
Topics discussed are:
![](resources/void.gif) | ![](resources/void.gif) | ![](resources/void.gif) | ![](resources/void.gif) | New features in Xerces-C++ 2.0.0 | ![](resources/void.gif) | ![](resources/void.gif) | ![](resources/void.gif) | ![](resources/void.gif) |
| |
- 64 bit binaries distribution
- Follow Unix Shared Library Naming Convention
- Apache Recommended DOM C++ Binding
- Experimental DOM Level 3 subset support, including DOMWriter and DOMBuilder
- Grammar preparsing and Grammar caching
- Optionally ignore loading of external DTD
- Project files for Microsoft Visual C++ .Net
- Codewarrior 8 support
- Option to enable/disable strict IANA encoding name checking
- plus many more bug fixes and performance enhancement
|
| |
The Xerces-C++ UNIX Library now follows the Unix Shared Library Naming Convention (libname.so.soname).
It is now called:
- AIX
- libxerces-c27.0.so
- symbolic link: libxerces-c.so ----> libxerces-c27.so
- symbolic link: libxerces-c27.so ----> libxerces-c27.0.so
- Solaris / Linux
- libxerces-c.so.27.0
- symbolic link: libxerces-c.so ----> libxerces-c.so.27
- symbolic link: libxerces-c.so.27 ----> libxerces-c.so.27.0
- HP-UX
- libxerces-c.sl.27.0
- symbolic link: libxerces-c.sl ----> libxerces-c.sl.27
- symbolic link: libxerces-c.sl.27 ----> libxerces-c.sl.27.0
|
| |
The following lists the public API changes between the Xerces-C++
1.7.0; and the Xerces-C++ 2.0.0 releases
of the parser.
| |
- To support DOM Level 3, the following are added (see
the API documentation page for details).
- DOMNode functions set/getUserData, isSameNode isEqualNode.
- DOMDocument functions renameNode, get/setActualEncoding, get/setEncoding, get/setVersion, get/setStandalone, get/setDocumentURI.
- DOMEntity functions get/setActualEncoding, get/setEncoding, get/setVersion.
- classes AbstractDOMParser, DOMError, DOMErrorHandler, and DOMLocator.
- classes DOMUserDataHandler, DOMImplementationRegistry and DOMImplementationSource.
- classes DOMBuilder, DOMEntityResolver, DOMImplementationLS, DOMInputSource,
Wrapper4DOMInputSource and Wrapper4InputSource.
- classes DOMWriter, DOMWriterFilter, LocalFileFormatTarget, StdOutFormatTarget,
and MemBufFormatTarget
- To support DOMWriter, the following PlatformUtils functions are added
- openFileToWrite, writeBufferToFile
- To have Apache Recommended DOM C++ Binding, the following are added (see
Apache Recommended DOM C++ binding).
- function release() to fix Memory Management problem
- classes DOMDocumentRange and DOMDocumentTraversal
- XMLSize_t is used to represent unsigned integral type in DOM
- IDOM_XXXX classes are renamed to DOMXXXX, and IDOMParser is renamed to XercesDOMParser
as described in DOM Reorganization
- XercesDOMParser::adoptDocument is added so that document can optionally live
outside the parser.
- To support optionally load external DTD, the following are added:
- XercesDOMParser::set/getLoadExternalDTD
- DOMParser::set/getLoadExternalDTD
- SAXParser::set/getLoadExternalDTD
- and SAX2XMLReader will recognize the feature
http://apache.org/xml/features/nonvalidating/load-external-dtd
- To support Preparsing Grammar and Grammar Caching, the following are added:
- XercesDOMParser/DOMParser/SAXParser functions loadGrammar, resetCachedGrammarPool,
cacheGrammarFromParse, isCachingGrammarFromParse, useCachedGrammarInParse,
isUsingCachedGrammarInParse.
- SAX2XMLReader functions loadGrammar, resetCachedGrammarPool, and will recognize the features
http://apache.org/xml/features/validation/cache-grammarFromParse and
http://apache.org/xml/features/validation/use-cachedGrammarInParse.
- To support access to Grammar info, the following are added:
- XercesDOMParser/DOMParser/SAXParser/SAX2XMLReader functions getRootGrammar, getGrammar, getURIText.
- To support strict IANA encoding name checking, the following are added:
- class EncodingValidator.
- PlatformUtils functions strictIANAEncoding, isStrictIANAEncoding.
- XMLTransService functions strictIANAEncoding, isStrictIANAEncoding.
|
| |
- SAXParser::getScanner() is moved from public to protected.
- Grammar::getGrammarType has been added a const modifier.
- Xerces features are renamed from XMLUni::fgSAX2XercesXXXX to XMLUni::fgXercesXXXX
so that they can be shared with DOM parser.
- With the new Grammar Caching introduced, the the last parameter "reuseGrammar" in
the following API is dropped.
Users should now use the "Grammar Caching" feature as described in
Reuse Grammar becomes Grammar Caching.
- (in Parser, SAXParser, DOMParser, and XercesDOMParser)
- parse(const InputSource& source, const bool reuseGrammar = false);
- parse(const XMLCh* const systemId, const bool reuseGrammar = false);
- parse(const char* const systemId, const bool reuseGrammar = false);
- (in SAXParser, DOMParser, and XercesDOMParser)
- parseFirst(const InputSource& source, XMLPScanToken& toFill, const bool reuseGrammar = false);
- parseFirst(const XMLCh* const systemId, XMLPScanToken& toFill, const bool reuseGrammar = false);
- parseFirst(const char* const systemId, XMLPScanToken& toFill, const bool reuseGrammar = false);
|
![](resources/void.gif) | ![](resources/void.gif) | ![](resources/void.gif) | ![](resources/void.gif) | Deprecated/Removed Public API | ![](resources/void.gif) | ![](resources/void.gif) | ![](resources/void.gif) | ![](resources/void.gif) |
| |
- The old Java-like DOM is now deprecated as described in
DOM Reorganization
- SAX2XMLReader::setValidationConstraint. For consistency, SAX2XMLReader users should
set the feature http://apache.org/xml/features/validation-error-as-fatal" instead.
- SAX2XMLReader::setExitOnFirstFatalError. For consistency, SAX2XMLReader users should
set the feature "http://apache.org/xml/features/continue-after-fatal-error" instead.
- With the new Grammar Caching introduced, the following features will not be
recognized by the SAX2XMLReader:
- http://apache.org/xml/features/validation/reuse-grammar
- http://apache.org/xml/features/validation/reuse-validator
|
|
|
![](resources/void.gif) | ![](resources/void.gif) | ![](resources/void.gif) | ![](resources/void.gif) | Migrating from Xerces-C++ 1.6.0 to 1.7.0 | ![](resources/void.gif) | ![](resources/void.gif) | ![](resources/void.gif) | ![](resources/void.gif) |
| |
The following section is a discussion of the technical differences between
Xerces-C++ 1.6.0 code base and the Xerces-C++ 1.7.0 code base.
![](resources/void.gif) | ![](resources/void.gif) | ![](resources/void.gif) | ![](resources/void.gif) | New features in Xerces-C++ 1.7.0 | ![](resources/void.gif) | ![](resources/void.gif) | ![](resources/void.gif) | ![](resources/void.gif) |
| |
- Support SAX2-ext's DeclHandler.
- Directory sane_include reorganization: add sub-directory 'xercesc' to src / include folder.
See "Directory change in Xerces-C++ 1.7.0"
below for detail.
- More IDOM test cases - port IDOMMemTest, and merge ThreadTest and IThreadTest.
- Support IconvFBSD in multi-threading environment.
- Use IDOM in schema processing for faster performance.
- Add Project files for BCB6.
- Port to Caldera (SCO) OpenServer.
- Support building with new MacOSURLAccessCF NetAccessor that doesn't require
Carbon but can allow Xerces to live solely within CoreServices layer.
|
![](resources/void.gif) | ![](resources/void.gif) | ![](resources/void.gif) | ![](resources/void.gif) | Directory change in Xerces-C++ 1.7.0 | ![](resources/void.gif) | ![](resources/void.gif) | ![](resources/void.gif) | ![](resources/void.gif) |
| |
- A new directory, src/xercesc is created to be the new parent directory of
all src's direct subdirectories.
- And in the binary package, all the headers are distributed in include/xercesc directory.
- Migration considerations:
- Windows application,
either change the include directories setting to
"..\..\..\..\..\src\xercesc" (Projects->settings->C/C++->Preprocessor),
or
change the relevant #include instances in the source/header files, accordingly, eg
#include <util/XMLString.hpp> be changed to
#include <xercesc/util/XMLString.hpp>
- Unix application,
either change the include search path in the Makefile to
" -I <installroot>/include/xercesc",
or
change the relevant #include instances in the source/header files as shown above.
|
![](resources/void.gif) | ![](resources/void.gif) | ![](resources/void.gif) | ![](resources/void.gif) | Public API Changes in Xerces-C++ 1.7.0 | ![](resources/void.gif) | ![](resources/void.gif) | ![](resources/void.gif) | ![](resources/void.gif) |
| |
The following lists the public API changes between the Xerces-C++
1.7.0 and the Xerces-C++ 1.7.0 releases
of the parser.
| |
- Added SAX2-ext's DeclHandler class.
See the API documentation page for details.
- To support SAX2-ext's DeclHandler, the following new methods are added
in classes DefaultHandler and SAX2XMLReader:
- void DefaultHandler::elementDecl(const XMLCh* const name, const XMLCh* const model)
- void DefaultHandler::attributeDecl(const XMLCh* const eName, const XMLCh* const aName,
const XMLCh* const type, const XMLCh* const mode, const XMLCh* const value)
- void DefaultHandler::internalEntityDecl(const XMLCh* const name, const XMLCh* const value)
- void DefaultHandler::externalEntityDecl(const XMLCh* const name, const XMLCh* const publicId,
const XMLCh* const systemId)
- DeclHandler* SAX2XMLReader::getDeclarationHandler() const
- void SAX2XMLReader::setDeclarationHandler(DeclHandler* const handler)
- To conform to DOM Level 2 specification, the following methods are added:
- DOM_Node DOM_NodeIterator::getRoot()
- DOM_Node DOM_TreeWalker::getRoot()
- bool DOM_Node::hasAttributes() const
- bool DOM_Element::hasAttribute(const DOMString &name) const
- bool DOM_Element::hasAttributeNS(const DOMString &namespaceURI,
const DOMString &localName) const
- IDOM_Node* IDOM_NodeIterator::getRoot()
- IDOM_Node* IDOM_TreeWalker::getRoot()
- bool IDOM_Node::hasAttributes() const
- bool IDOM_Element::hasAttribute(const XMLCh* name) const
- bool IDOM_Element::hasAttributeNS(const XMLCh* namespaceURI,
const XMLCh* localName) const
- To fix [Bug 5570], a copy constructor is added to DOM_Range
|
| |
- To conform to the SAX2 specification, the namespace-prefixes feature
in SAX2 is set to off as default.
- To fix [Bug 6330], the Base64::encode and Base64::decode have been modified
as follows
- static XMLByte* Base64::encode(const XMLByte* const inputData,
const unsigned int inputLength,
unsigned int* outputLength);
- static XMLByte* Base64::decode(const XMLByte* const inputData,
unsigned int* outputLength);
- static XMLCh* decode(const XMLCh* const inputData,
unsigned int* outputLength);
- To conform to DOM Level 2 specification, the DOM_Node::supports and IDOM_Node::supports
are modified to
- bool DOM_Node::isSupported(const DOMString &feature, const DOMString &version) const
- bool IDOM_Node::isSupported(const XMLCh* feature, const XMLCh* version) const
|
| |
- No Deprecated Public API in this release.
|
|
|
![](resources/void.gif) | ![](resources/void.gif) | ![](resources/void.gif) | ![](resources/void.gif) | Migrating from XML4C 2.x to Xerces-C++ 1.4.0 | ![](resources/void.gif) | ![](resources/void.gif) | ![](resources/void.gif) | ![](resources/void.gif) |
| |
The following section is a discussion of the technical differences between
XML4C 2.x code base and the new Xerces-C++ 1.4.0 code base.
| |
The sample programs no longer use any of the unsupported
util/xxx classes. They only existed to allow us to write
portable samples. But, since we feel that the wide character
APIs are supported on a lot of platforms these days, it was
decided to go ahead and just write the samples in terms of
these. If your system does not support these APIs, you will
not be able to build and run the samples. On some platforms,
these APIs might perhaps be optional packages or require
runtime updates or some such action.
More samples have been added as well. These highlight some
of the new functionality introduced in the new code base. And
the existing ones have been cleaned up as well.
The new samples are:
- PParse - Demonstrates 'progressive parse' (see below)
- StdInParse - Demonstrates use of the standard in input source
- EnumVal - Shows how to enumerate the markup decls in a DTD Validator
|
| |
In the XML4C 2.x code base, there were the following parser
classes (in the src/parsers/ source directory):
NonValidatingSAXParser, ValidatingSAXParser,
NonValidatingDOMParser, ValidatingDOMParser. The
non-validating ones were the base classes and the validating
ones just derived from them and turned on the validation.
This was deemed a little bit overblown, considering the tiny
amount of code required to turn on validation and the fact
that it makes people use a pointer to the parser in most cases
(if they needed to support either validating or non-validating
versions.)
The new code base just has SAXParer and DOMParser
classes. These are capable of handling both validating and
non-validating modes, according to the state of a flag that
you can set on them. For instance, here is a code snippet that
shows this in action.
![](resources/void.gif) | ![](resources/void.gif) | ![](resources/void.gif) | ![](resources/void.gif) | void ParseThis(const XMLCh* const fileToParse,
const bool validate)
{
//
// Create a SAXParser. It can now just be
// created by value on the stack if we want
// to parse something within this scope.
//
SAXParser myParser;
// Tell it whether to validate or not
myParser.setDoValidation(validate);
// Parse and catch exceptions...
try
{
myParser.parse(fileToParse);
}
...
}; | ![](resources/void.gif) | ![](resources/void.gif) | ![](resources/void.gif) | ![](resources/void.gif) |
We feel that this is a simpler architecture, and that it makes things
easier for you. In the above example, for instance, the parser will be
cleaned up for you automatically upon exit since you don't have to
allocate it anymore.
|
|
|
|