
























|
| |
For migration information to Xerces-C++ 1.7.0 or earlier,
please refer to Migration Archive.
|
 |  |  |  | Migrating from Xerces-C++ 1.7.0 to Xerces-C++ 2.0.0 |  |  |  |  |
| |
This document 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:
 |  |  |  | New features in Xerces-C++ 2.0.0 |  |  |  |  |
| |
- 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-c20.0.so
- symbolic link: libxerces-c.so ----> libxerces-c20.so
- symbolic link: libxerces-c20.so ----> libxerces-c20.0.so
- Solaris / Linux
- libxerces-c.so.20.0
- symbolic link: libxerces-c.so ----> libxerces-c.so.20
- symbolic link: libxerces-c.so.20 ----> libxerces-c.so.20.0
- HP-UX
- libxerces-c.sl.20.0
- symbolic link: libxerces-c.sl ----> libxerces-c.sl.20
- symbolic link: libxerces-c.sl.20 ----> libxerces-c.sl.20.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);
|
 |  |  |  | Deprecated/Removed Public API |  |  |  |  |
| |
- 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
|
|
|
|
|