| <?xml version="1.0" standalone="no"?> |
| <!DOCTYPE s1 SYSTEM "sbk:/style/dtd/document.dtd"> |
| |
| <s1 title="&XercesCName; Samples"> |
| |
| <s2 title="Introduction"> |
| <p>&XercesCName; comes packaged with 15 sample applications that |
| demonstrate salient features of the parser using simple |
| applications written on top of the SAX and DOM APIs provided by |
| the parser. Sample XML data files are provided in the samples/data directory.</p> |
| </s2> |
| |
| <s2 title="Building the Samples"> |
| <p>Please refer to the <jump href="build.html">Build Page</jump> for |
| Build Instructions as per specific platform.</p> |
| </s2> |
| |
| <s2 title="Running the Samples"> |
| |
| <p>The sample applications are dependent on the &XercesCName; shared library |
| (and could also depend on the ICU library if you built &XercesCName; with ICU). |
| Therefore, on Windows platforms you must make sure that your <code>PATH</code> |
| environment variable is set properly to pick up these shared libraries at |
| runtime.</p> |
| |
| <p>On UNIX platforms you must ensure that <ref>LIBPATH</ref> |
| environment variable is set properly to pick up the shared libraries at |
| runtime. (UNIX gurus will understand here that <ref>LIBPATH</ref> actually |
| translates to <em>LD_LIBRARY_PATH</em> on Solaris and Linux, <em>SHLIB_PATH</em> on HP-UX |
| and stays as <em>LIBPATH</em> on AIX).</p> |
| |
| <p>To set you LIBPATH (on AIX for example), you would type:</p> |
| <source>export LIBPATH=&XercesCInstallDir;/lib:$LIBPATH</source> |
| |
| <p>Once you have set up your PATH variable, you can run the |
| samples by opening a command window (or your shell prompt for |
| UNIX environments).</p> |
| |
| <s3 title="&XercesCName; Samples"> |
| <ul> |
| <li><link idref="saxcount">SAXCount</link> |
| <br/>SAXCount counts the elements, attributes, spaces and |
| characters in an XML file.</li> |
| <li><link idref="saxprint">SAXPrint</link> |
| <br/>SAXPrint parses an XML file and prints it out.</li> |
| <li><link idref="domcount">DOMCount</link> |
| <br/>DOMCount counts the elements in a XML file.</li> |
| <li><link idref="domprint">DOMPrint</link> |
| <br/>DOMPrint parses an XML file and prints it out.</li> |
| <li><link idref="memparse">MemParse</link> |
| <br/>MemParse parses XML in a memory buffer, outputing the number of elements and attributes.</li> |
| <li><link idref="redirect">Redirect</link> |
| <br/>Redirect redirects the input stream for external entities.</li> |
| <li><link idref="pparse">PParse</link> |
| <br/>PParse demonstrates progressive parsing.</li> |
| <li><link idref="stdinparse">StdInParse</link> |
| <br/>StdInParse demonstrates streaming XML data from standard input.</li> |
| <li><link idref="enumval">EnumVal</link> |
| <br/>EnumVal shows how to enumerate the markup decls in a DTD Grammar.</li> |
| <li><link idref="senumval">SEnumVal</link> |
| <br/>SEnumVal shows how to enumerate the markup decls in a Schema Grammar.</li> |
| <li><link idref="createdoc">CreateDOMDocument</link> |
| <br/>CreateDOMDocument creates a DOM tree in memory from scratch.</li> |
| <li><link idref="sax2count">SAX2Count</link> |
| <br/>SAX2Count counts the elements, attributes, spaces and |
| characters in an XML file.</li> |
| <li><link idref="sax2print">SAX2Print</link> |
| <br/>SAX2Print parses an XML file and prints it out.</li> |
| <li><link idref="idomcount">IDOMCount</link> |
| <br/>IDOMCount counts the elements in a XML file.</li> |
| <li><link idref="idomprint">IDOMPrint</link> |
| <br/>IDOMPrint parses an XML file and prints it out.</li> |
| </ul> |
| </s3> |
| </s2> |
| </s1> |