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.

96 lines
4.9 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="&XercesCName; Samples">
  20. <s2 title="Introduction">
  21. <p>&XercesCName; comes with sample applications that
  22. demonstrate salient features of the parser. They are simple
  23. applications written on top of the SAX and DOM APIs provided by
  24. the parser. Sample XML data files are provided in the
  25. <code>samples/data</code> directory.</p>
  26. </s2>
  27. <s2 title="Running the Samples">
  28. <p>The sample applications are dependent on the &XercesCName; shared library
  29. (and could also depend on the ICU library if you built &XercesCName; with ICU).
  30. Therefore, on Windows platforms you must make sure that your <code>PATH</code>
  31. environment variable is set properly to pick up these shared libraries at
  32. runtime.</p>
  33. <p>On UNIX platforms you must ensure that <code>LD_LIBRARY_PATH</code>
  34. environment variable is set properly to pick up the shared libraries at
  35. runtime. (UNIX gurus will understand here that <code>LD_LIBRARY_PATH</code>
  36. actually translates to <code>LD_LIBRARY_PATH</code> on Solaris and Linux,
  37. <code>SHLIB_PATH</code> on HP-UX, <code>DYLD_LIBRARY_PATH</code> on Mac OS X,
  38. and <code>LIBPATH</code> on AIX).</p>
  39. <p>On both Windows and UNIX platforms, if the parser is built with the ICU
  40. message loader or message catalog loader, then you may need to set another
  41. environment variable, <code>XERCESC_NLS_HOME</code>, to point to the
  42. &XercesC3SrcInstallDir;/msg directory, which is where the message
  43. files reside.
  44. </p>
  45. <p>Once you have set up the environment variables, you can run the
  46. samples by opening a command window (or your shell prompt for
  47. UNIX environments).</p>
  48. <s3 title="&XercesCName; Samples">
  49. <ul>
  50. <li><link idref="saxcount-&XercesC3Series;">SAXCount</link>
  51. <br/>SAXCount counts the elements, attributes, spaces and
  52. characters in an XML file.</li>
  53. <li><link idref="saxprint-&XercesC3Series;">SAXPrint</link>
  54. <br/>SAXPrint parses an XML file and prints it out.</li>
  55. <li><link idref="sax2count-&XercesC3Series;">SAX2Count</link>
  56. <br/>SAX2Count counts the elements, attributes, spaces and
  57. characters in an XML file.</li>
  58. <li><link idref="sax2print-&XercesC3Series;">SAX2Print</link>
  59. <br/>SAX2Print parses an XML file and prints it out.</li>
  60. <li><link idref="domcount-&XercesC3Series;">DOMCount</link>
  61. <br/>DOMCount counts the elements in a XML file.</li>
  62. <li><link idref="domprint-&XercesC3Series;">DOMPrint</link>
  63. <br/>DOMPrint parses an XML file and prints it out.</li>
  64. <li><link idref="createdoc-&XercesC3Series;">CreateDOMDocument</link>
  65. <br/>CreateDOMDocument creates a DOM tree in memory from scratch.</li>
  66. <li><link idref="memparse-&XercesC3Series;">MemParse</link>
  67. <br/>MemParse parses XML in a memory buffer, printing the number of elements and attributes.</li>
  68. <li><link idref="redirect-&XercesC3Series;">Redirect</link>
  69. <br/>Redirect redirects the input stream for external entities.</li>
  70. <li><link idref="pparse-&XercesC3Series;">PParse</link>
  71. <br/>PParse demonstrates progressive parsing.</li>
  72. <li><link idref="stdinparse-&XercesC3Series;">StdInParse</link>
  73. <br/>StdInParse demonstrates streaming XML data from standard input.</li>
  74. <li><link idref="enumval-&XercesC3Series;">EnumVal</link>
  75. <br/>EnumVal shows how to enumerate the markup declarations in a DTD Grammar.</li>
  76. <li><link idref="senumval-&XercesC3Series;">SEnumVal</link>
  77. <br/>SEnumVal shows how to enumerate the markup declarations in a Schema Grammar.</li>
  78. <li><link idref="psviwriter-&XercesC3Series;">PSVIWriter</link>
  79. <br/>PSVIWriter exposes the underlying PSVI of the parsed XML file.</li>
  80. <li><link idref="scmprint-&XercesC3Series;">SCMPrint</link>
  81. <br/>SCMPrint parses an XSD file and prints information about the Schema Component Model.</li>
  82. <li><link idref="xinclude-&XercesC3Series;">XInclude</link>
  83. <br/>XInclude parses an XML file and writes a new XML file with the xi:include elements expanded.</li>
  84. </ul>
  85. </s3>
  86. </s2>
  87. </s1>