Xerces-C++ Documentation
Total Page:16
File Type:pdf, Size:1020Kb
Xerces-C++ Documentation Copyright 1999-2005 The Apache Software Foundation. All Rights Reserved. Xerces-C++ Documentation Table of Contents 1. Xerces C++ Parser 7 Xerces-C++ Version 2.7.0 7 Applications of the Xerces Parser 7 Features 7 Platforms with Binaries 8 Other ports... 8 License Information 8 2. Xerces C++ Parser 9 Xerces Project Charter 9 1 INTRODUCTION 9 2 MISSION 9 3 HISTORY 9 4 TERMS 10 5 THE PROJECT MANAGEMENT COMMITTEE 10 6 SUBPROJECTS 11 7 CONTRIBUTORS 11 8 COMMITTERS 12 9 INFRASTRUCTURE 12 10 LICENSING 13 11 THE DEVELOPMENT PROCESS 13 12 SUBPROJECT REQUIREMENTS 13 13 RELATIONSHIP TO OTHER APACHE PROJECTS 13 3. Releases 14 Releases Plan 14 Releases Archive 14 Release Information of Xerces-C++ 2.7.0 14 4. Releases Archive 20 Release Information of earlier releases 20 Release Information of Xerces-C++ 2.6.0 20 Release Information of Xerces-C++ 2.5.0 26 Release Information of Xerces-C++ 2.4.0 Dec. 2, 2003 33 Release Information of Xerces-C++ 2.3.0: May 23, 2003 43 Release Information of Xerces-C++ 2.2.0: February 7, 2003 46 Release Information of Xerces-C++ 2.1.0: August 26, 2002 55 Release Information of Xerces-C++ 2.0.0: July 23, 2002 58 Release Information of Xerces-C++ 1.7.0: March 8, 2002 63 Release Information of Xerces-C++ 1.6.0: December 6, 2001 67 Release Information of Xerces-C++ 1.5.2: October 26, 2001 71 Release Information of Xerces-C++ 1.5.1: July 18, 2001 75 Release Information of Xerces-C++ 1.5.0: June 15, 2001 77 Release Information of Xerces-C++ 1.4.0: January 31, 2001 81 Release Information of Xerces-C++ 1.3.0: Sept 21, 2000 84 Release Information of Xerces-C++ 1.2.0: June 22, 2000 88 Release Information of Xerces-C++ 1.1.0: Feb 28, 2000 91 Xerces-C++ Documentation Release Information of Xerces-C++ 1.0.1: December 15, 1999 92 Release Information of Xerces-C++ 1.0.0: December 7, 1999 93 Release Information of Xerces-C++ BETA: November 5, 1999 93 5. Installation 94 Windows NT/2000 94 UNIX 94 Cygwin 96 6. Build Instructions 97 Building on Windows and UNIX 97 Building on Other Platforms 97 Other Build Instructions 97 7. Building on Windows and UNIX 98 Building Xerces-C++ on Windows using Microsoft Visual C++ 98 Building Xerces-C++ 64 bit binary on Windows XP using Intel C++ Compiler 99 Building Xerces-C++ on Windows using Borland C++Builder 99 Building Xerces-C++ on Windows using Borland C++ Compiler 99 Building Xerces-C++ on Windows using Cygwin 100 Building Xerces-C++ on UNIX platforms 100 Building Xerces-C++ as a single-threaded library on Unix platforms 106 8. Building on Other Platforms 107 Building Xerces-C++ on iSeries (AS/400) 107 Building Xerces-C++ on Macintosh 112 9. Other Build Instructions 115 Building Xerces-C++ with ICU 115 Building Xerces-C++ using RPM on Linux 117 Building Xerces-C++ COM Wrapper on Windows 117 Building User Documentation 118 I wish to port Xerces to my favourite platform. Do you have any suggestions? 118 What should I define XMLCh to be? 118 Where can I look for more help? 119 10. FAQs 120 Building / Running FAQs 120 Programming/Parsing FAQs 124 Other Xerces-C++ Questions 134 11. Xerces-C++ Samples 137 Introduction 137 Building the Samples 137 Running the Samples 137 12. Sample: SAXCount 139 SAXCount 139 13. Sample: SAXPrint 141 SAXPrint 141 14. Sample: DOMCount 144 Xerces-C++ Documentation DOMCount 144 15. Sample: DOMPrint 146 DOMPrint 146 16. Sample: MemParse 149 MemParse 149 17. Sample: Redirect 151 Redirect 151 18. Sample: PParse 152 PParse 152 19. Sample: StdInParse 154 StdInParse 154 20. Sample: EnumVal 156 EnumVal 156 21. Sample: CreateDOMDocument 158 CreateDOMDocument 158 22. Sample: SAX2Count 159 SAX2Count 159 23. Sample: SAX2Print 161 SAX2Print 161 24. Sample: SEnumVal 164 SEnumVal 164 25. Sample: PSVIWriter 167 PSVIWriter 167 26. Sample: SCMPrint 169 SCMPrint 169 27. API Documentation 172 API Docs for Xerces-C++ 172 28. Programming Guide 173 DOM Programming Guide 173 SAX Programming Guide 174 SAX2 Programming Guide 174 Other Features 174 29. SAX1 Programming Guide 176 Using the SAX API 176 SAXParser 177 30. SAX2 Programming Guide 186 Using the SAX2 API 186 SAX2XMLReader 187 31. DOM Programming Guide 197 Design Objectives 197 DOM Level 3 Support in Xerces-C++ 197 Xerces-C++ Documentation Using DOM API 197 XercesDOMParser 201 DOMBuilder 210 DOMWriter 223 Deprecated - Java-like DOM 229 32. DOM Level 3 Support 230 Disclaimer 230 Introduction 230 Implementation of DOM Level 3 Core 230 Implementation of DOM Level 3 Load and Save 230 Implementation of DOM Level 3 Abstract Schemas 231 33. Deprecated - Java-like DOM 232 Deprecated - Java-like DOM 232 Using this set of deprecated API 232 DOMParser 235 34. Schema 243 Introduction 243 Limitations 243 Interpretation of Areas that are Unclear or Implementation-Dependent 243 Usage 244 Associating Schema Grammar with instance document 244 35. Programming Guide 247 Version Macro 247 Schema Support 247 Progressive Parsing 247 Preparsing Grammar and Grammar Caching 248 Loadable Message Text 250 Pluggable Transcoders 250 Porting Guidelines 251 Using C++ Namespace 252 Specify Locale for Message Loader 254 Specify Location for Message Loader 255 Pluggable Panic Handler 255 Pluggable Memory Manager 256 Managing Security Vulnerabilities 257 Use Specific Scanner 258 36. Migration 260 Migration Archive 260 Migrating from Xerces-C++ 2.6.0 to Xerces-C++ 2.7.0 260 37. Migration Archive 261 Migrating to earlier Releases 261 Migrating from Xerces-C++ 2.5.0 to Xerces-C++ 2.6.0 261 Migrating from Xerces-C++ 2.4.0 to Xerces-C++ 2.5.0 263 Migrating from Xerces-C++ 2.3.0 to Xerces-C++ 2.4.0 263 Migrating from Xerces-C++ 2.2.0 to Xerces-C++ 2.3.0 264 Xerces-C++ Documentation Migrating from Xerces-C++ 2.1.0 to Xerces-C++ 2.2.0 265 Migrating from Xerces-C++ 2.0.0 to Xerces-C++ 2.1.0 267 Migrating from Xerces-C++ 1.7.0 to Xerces-C++ 2.0.0 268 Migrating from Xerces-C++ 1.6.0 to 1.7.0 273 Migrating from Xerces-C++ 1.5.2 to 1.6.0 275 Migrating from Xerces-C++ 1.4.0 to 1.5.2 276 Migrating from XML4C 2.x to Xerces-C++ 1.4.0 276 38. Feedback Procedures 280 Questions or Comments 280 Acknowledgements 280 39. Bug Reporting 284 How to report bugs 284 Search first 284 Write a good bug report 284 40. PDF Documentation 286 PDF Documentation 286 Appendix A: Links Reference 287 1 Xerces C++ Parser Xerces-C++ Version 2.7.0 Xerces-C++ is a validating XML parser written in a portable subset of C++. Xerces-C++ makes it easy to give your application the ability to read and write XML [1] data. A shared library is provided for parsing, generating, manipulating, and validating XML documents. Xerces-C++ is faithful to the XML 1.0 [2] recommendation and many associated standards (see Features below). The parser provides high performance, modularity, and scalability. Source code, samples and API documentation are provided with the parser. For portability, care has been taken to make minimal use of templates, no RTTI, and minimal use of #ifdefs. Applications of the Xerces Parser Xerces has rich generating and validating capabilities. The parser is used for: · Building XML-savvy Web servers · Building next generation of vertical applications that use XML as their data format · On-the-fly validation for creating XML editors · Ensuring the integrity of e-business data expressed in XML · Building truly internationalized XML applications Features · Conforms to · XML 1.0 (Third Edition) [3] , W3C Recommendation · XML 1.1 (First Edition) [4] , W3C Recommendation (Note: section 2.13 Normalization Checking has not been implemented) · DOM Level 1 Specification [5] , W3C Recommendation of October 1, 1998 · DOM Level 2 Core Specification [6] , W3C Recommendation of November 13, 2000 · DOM Level 2 Traversal and Range Specification [7] , W3C Recommendation of November 13, 2000 · SAX 1.0 and SAX 2.0 [8] · Namespaces in XML [9] , W3C Recommendation of January 14, 1999 · Namespaces in XML 1.1 [10] , W3C Recommendation · XML Schema Part 1: Structure [11] , W3C Recommendation 2 May 2001 · XML Schema Part 2: Datatypes [12] , W3C Recommendation 2 May 2001 · Contains a partial implementation of the DOM Level 3.0 Core Specification [13] , Version 1.0 W3C Working Draft 26 February 2003 and Document Object Model (DOM) Level 3 Load and Save Specification [14] , Version 1.0 W3C Working Draft 26 February 2003. This implementation is - 7- Chapter 1 - Xerces C++ Parser Xerces-C++ Documentation experimental. See DOM Level 3 Support for detail. · Source code, samples, and documentation is provided · Programmatic generation and validation of XML · Pluggable catalogs, validators and encodings · High performance · Customizable error handling Platforms with Binaries Operating System Compiler 32-bit binary Windows 2000 MS Visual C++ 6.0 SP3 AIX 5.1 xlC_r 6.0.0 Solaris 2.8 Forte C++ Version 6 Update 2 HP-UX 11i aCC A.03.52 with pthreads RHEL 4.0 (IA32) gcc 3.4.3 64-bit binary AIX 5.1 xlC_r 6.0.0 Solaris 2.8 Forte C++ Version 6 Update 2 HP-UX 11i aCC A.03.52 with pthreads SuSE Linux 8.0 (AMD64) gcc 3.2.2 Other ports... · OS/390 · AS/400 · FreeBSD · SGI IRIX · Macintosh · OS/2 · PTX · UnixWare · and more! License Information The Xerces-C++ Version 2.7.0 is available in both source distribution and binary distribution.