beautypg.com

Building the xerces-c++ samples – HP Integrity NonStop H-Series User Manual

Page 15

background image

You can execute the samples from OSS command line directly as follows:

OSS> cd /samples/

OSS> ./

Building the Xerces-C++ samples

The NonStop XML Parser is packaged with the following Xerces-C++ samples. These samples are
available in the /samples directory, where XERCESCROOT is the
/xercesc

directory.

Function

Sample

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
/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 /samples/defs.mk file. For a sample defs.mk
file, see appendix

“Sample defs.mk file” (page 17)

.

Building the Xerces-C++ samples

15

This manual is related to the following products: