You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

149 lines
8.0 KiB

  1. <?xml version="1.0" standalone="no"?>
  2. <!--
  3. * Licensed to the Apache Software Foundation (ASF) under one or more
  4. * contributor license agreements. See the NOTICE file distributed with
  5. * this work for additional information regarding copyright ownership.
  6. * The ASF licenses this file to You under the Apache License, Version 2.0
  7. * (the "License"); you may not use this file except in compliance with
  8. * the License. You may obtain a copy of the License at
  9. *
  10. * http://www.apache.org/licenses/LICENSE-2.0
  11. *
  12. * Unless required by applicable law or agreed to in writing, software
  13. * distributed under the License is distributed on an "AS IS" BASIS,
  14. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  15. * See the License for the specific language governing permissions and
  16. * limitations under the License.
  17. -->
  18. <!DOCTYPE s1 SYSTEM "sbk:/style/dtd/document.dtd">
  19. <s1 title="Programming Guide">
  20. <p>This Programming Guide is for &XercesCName; version &XercesC3Version;.</p>
  21. <p>Independent of the API you want to use, DOM, SAX, or SAX2, your
  22. application must initialize the &XercesCProjectName; system
  23. before using the API, and terminate it after you are done. This
  24. is achieved by the following code:</p>
  25. <source>
  26. #include &lt;xercesc/util/PlatformUtils.hpp&gt;
  27. // Other include files, declarations, and non-&XercesCName; initializations.
  28. using namespace xercesc;
  29. int main(int argc, char* argv[])
  30. {
  31. try {
  32. XMLPlatformUtils::Initialize();
  33. }
  34. catch (const XMLException&amp; toCatch) {
  35. // Do your failure processing here
  36. return 1;
  37. }
  38. // Do your actual work with &XercesCName; here.
  39. XMLPlatformUtils::Terminate();
  40. // Other terminations and cleanup.
  41. return 0;
  42. }</source>
  43. <p><code>XMLPlatformUtils::Initialize()</code> and
  44. <code>XMLPlatformUtils::Terminate</code> must be called at
  45. least once in each process. You are allowed to call
  46. <code>XMLPlatformUtils::Initialize()</code> and
  47. <code>XMLPlatformUtils::Terminate</code> multiple times, but
  48. each call to <code>XMLPlatformUtils::Initialize()</code> must
  49. be matched with a call to
  50. <code>XMLPlatformUtils::Terminate</code>.</p>
  51. <s2 title="DOM Programming Guide">
  52. <p>The DOM API is based on the
  53. <jump href="ApacheDOMC++Binding.html">Apache Recommended DOM C++ binding</jump>.</p>
  54. <p>Read the <jump href="program-dom-&XercesC3Series;.html">DOM Programming Guide</jump> document
  55. or jump directly to:</p>
  56. <ul>
  57. <li><jump href="program-dom-&XercesC3Series;.html#Objectives">Design Objectives</jump></li>
  58. <li><jump href="program-dom-&XercesC3Series;.html#DOM3">DOM Level 3 Support in &XercesCName; </jump></li>
  59. <li><jump href="program-dom-&XercesC3Series;.html#UsingDOMAPI">Using DOM API</jump></li>
  60. <ul>
  61. <li><jump href="program-dom-&XercesC3Series;.html#AccessAPI">Accessing API from application code</jump></li>
  62. <li><jump href="program-dom-&XercesC3Series;.html#DOMClassNames">Class Names</jump></li>
  63. <li><jump href="program-dom-&XercesC3Series;.html#DOMObjMgmt">Objects Management</jump></li>
  64. <li><jump href="program-dom-&XercesC3Series;.html#DOMMemMgmt">Memory Management</jump></li>
  65. <li><jump href="program-dom-&XercesC3Series;.html#XMLCh">String Type</jump></li>
  66. </ul>
  67. <li><jump href="program-dom-&XercesC3Series;.html#XercesDOMParser">XercesDOMParser</jump></li>
  68. <ul>
  69. <li><jump href="program-dom-&XercesC3Series;.html#ConstructXercesDOMParser">Constructing a XercesDOMParser</jump></li>
  70. <li><jump href="program-dom-&XercesC3Series;.html#XercesDOMFeatures">Supported Features</jump></li>
  71. <li><jump href="program-dom-&XercesC3Series;.html#XercesDOMProperties">Supported Properties</jump></li>
  72. </ul>
  73. <li><jump href="program-dom-&XercesC3Series;.html#DOMLSParser">DOMLSParser</jump></li>
  74. <ul>
  75. <li><jump href="program-dom-&XercesC3Series;.html#ConstructDOMLSParser">Constructing a DOMLSParser</jump></li>
  76. <li><jump href="program-dom-&XercesC3Series;.html#InputSourceWrapper">How to interchange DOMLSInput and SAX InputSource?</jump></li>
  77. <li><jump href="program-dom-&XercesC3Series;.html#DOMLSParserFeatures">Supported Features</jump></li>
  78. <li><jump href="program-dom-&XercesC3Series;.html#DOMLSParserProperties">Supported Properties</jump></li>
  79. </ul>
  80. <li><jump href="program-dom-&XercesC3Series;.html#DOMLSSerializer">DOMLSSerializer</jump></li>
  81. <ul>
  82. <li><jump href="program-dom-&XercesC3Series;.html#ConstructDOMLSSerializer">Constructing a DOMLSSerializer</jump></li>
  83. <li><jump href="program-dom-&XercesC3Series;.html#DOMLSSerializerEntityRef">How does DOMLSSerializer handle built-in entity Reference in node value?</jump></li>
  84. <li><jump href="program-dom-&XercesC3Series;.html#DOMLSSerializerFeatures">Supported Features</jump></li>
  85. </ul>
  86. </ul>
  87. </s2>
  88. <s2 title="SAX2 Programming Guide">
  89. <p>Read the <jump href="program-sax2-&XercesC3Series;.html">SAX2 Programming Guide</jump> document
  90. or jump directly to:</p>
  91. <ul>
  92. <li><jump href="program-sax2-&XercesC3Series;.html#UsingSAX2API">Using the SAX2 API</jump></li>
  93. <li><jump href="program-sax2-&XercesC3Series;.html#SAX2XMLReader">SAX2XMLReader</jump></li>
  94. <ul>
  95. <li><jump href="program-sax2-&XercesC3Series;.html#ConstructParser2">Constructing an XML Reader</jump></li>
  96. <li><jump href="program-sax2-&XercesC3Series;.html#SAX2Features">Supported Features</jump></li>
  97. <li><jump href="program-sax2-&XercesC3Series;.html#SAX2Properties">Supported Properties</jump></li>
  98. </ul>
  99. </ul>
  100. </s2>
  101. <s2 title="SAX Programming Guide">
  102. <p>Read the <jump href="program-sax-&XercesC3Series;.html">SAX Programming Guide</jump> document
  103. or jump directly to:</p>
  104. <ul>
  105. <li><jump href="program-sax-&XercesC3Series;.html#UsingSAX1API">Using the SAX API</jump></li>
  106. <li><jump href="program-sax-&XercesC3Series;.html#SAXParser">SAXParser</jump></li>
  107. <ul>
  108. <li><jump href="program-sax-&XercesC3Series;.html#ConstructParser">Constructing a SAXParser</jump></li>
  109. <li><jump href="program-sax-&XercesC3Series;.html#SAXFeatures">Supported Features</jump></li>
  110. </ul>
  111. </ul>
  112. </s2>
  113. <s2 title="Other Features">
  114. <p>Read the <jump href="program-others-&XercesC3Series;.html">&XercesCName; Programming Guide</jump> document
  115. or jump directly to:</p>
  116. <ul>
  117. <li><jump href="program-others-&XercesC3Series;.html#Macro">Version Macros</jump></li>
  118. <li><jump href="program-others-&XercesC3Series;.html#Schema">Schema Support</jump></li>
  119. <li><jump href="program-others-&XercesC3Series;.html#Progressive">Progressive Parsing</jump></li>
  120. <li><jump href="program-others-&XercesC3Series;.html#GrammarCache">Pre-parsing Grammar and Grammar Caching</jump></li>
  121. <li><jump href="program-others-&XercesC3Series;.html#LoadableMessageText">Loadable Message Text</jump></li>
  122. <li><jump href="program-others-&XercesC3Series;.html#PluggableTranscoders">Pluggable Transcoders</jump></li>
  123. <li><jump href="program-others-&XercesC3Series;.html#PortingGuidelines">Porting Guidelines</jump></li>
  124. <li><jump href="program-others-&XercesC3Series;.html#CPPNamespace">Using C++ Namespace</jump></li>
  125. <li><jump href="program-others-&XercesC3Series;.html#SpecifylocaleforMessageLoader">Specify Locale for Message Loader</jump></li>
  126. <li><jump href="program-others-&XercesC3Series;.html#SpecifylocationforMessageLoader">Specify Location for Message Loader</jump></li>
  127. <li><jump href="program-others-&XercesC3Series;.html#UseSpecificScanner">Use Specific Scanner</jump></li>
  128. <li><jump href="program-others-&XercesC3Series;.html#PluggablePanicHandler">Pluggable Panic Handler</jump></li>
  129. <li><jump href="program-others-&XercesC3Series;.html#PluggableMemoryManager">Pluggable Memory Manager</jump></li>
  130. <li><jump href="program-others-&XercesC3Series;.html#SecurityManager">Managing Security Vulnerabilities</jump></li>
  131. </ul>
  132. </s2>
  133. </s1>