NonStop XML Parser User Guide

You can execute the samples from OSS command line directly as follows:
OSS> cd <icu_user_location>/samples/<sample-dir>
OSS> ./<sample exe file>
Building the Xerces-C++ samples
The NonStop XML Parser is packaged with the following Xerces-C++ samples. These samples are
available in the <XERCESCROOT>/samples directory, where XERCESCROOT is the
<NonStop_XML_Parser_Installation_Directory>/xercesc directory.
FunctionSample
Creates a DOM tree in memory from scratch.CreateDOMDocument
Counts the elements in an XML file.DOMCount
Parses an XML file and prints it.DOMPrint
Displays how to enumerate the markup declarations in a DTD validator.EnumVal
Parses XML in a memory buffer and prints the number of elements and attributes.MemParse
Demonstrates progressive parsing.PParse
Parses the specified XML file, and exposes the PSVI and Schema Component Model information.PSVIWriter
Redirects the input stream for external entities.Redirect
Parses an XML file and prints out a count of the number of elements and characters in the file.SAX2Count
Parses an XML file and prints it.SAX2Print
Counts the elements, attributes, spaces, and characters of a given XML file.SAXCount
Parses an XML file and prints it.SAXPrint
Parses the specified XSD file, then shows how to access the Schema Content Model information.SCMPrint
Displays how to enumerate the markup declarations in a Schema Grammar.SEnumVal
Demonstrates streaming XML data from the standard input.StdInParse
Converts an input XML file into an expanded output XML file.Xinclude
Perform the following steps before building the samples:
Copy the samples directory and sub-directories to an OSS location where you have read,
write, and execute permissions. This location is referred to as
<xercesc_user_location>/samples.
Set the XERCESCROOT environment variable by entering the following command:
OSS> export XERCESCROOT=/usr/tandem/xml/T0970H01/xercesc
If you want to build these samples with ICU support, then set the ICUROOT and ICU_DATA
environment variables by entering the following commands:
OSS> export ICUROOT=/usr/tandem/xml/T0970H01/icu
OSS> export ICU_DATA=$ICUROOT/share/icu/50.1.2/
You can build the samples with different combinations of libraries that are available. You can
compile the samples by setting the values of the FLOAT, VERSION, ICU_SUPPORT, and PLATFORM
variables in the <xercesc_user_location>/samples/defs.mk file. For a sample defs.mk
file, see appendix “Sample defs.mk file” (page 17).
Building the Xerces-C++ samples 15