http://xml.apache.org/http://www.apache.org/http://www.w3.org/

Home

Readme
Installation
Build

API Docs
Samples
Programming
Migration
FAQs

Releases
Feedback

PDF Document

Download
Dev Snapshots
CVS Repository
Mail Archive

EnumVal
 

EnumVal shows how to enumerate the markup decls in a DTD Validator.

Building on Windows
 

Load the xerces-c-1_2_0-win32\samples\Projects\Win32\VC6\samples.dsw Microsoft Visual C++ workspace inside your MSVC IDE. Then build the project marked EnumVal.


Building on UNIX
 
cd xerces-c-1_2_0-linux/samples
./runConfigure -p<platform> -c<C_compiler> -x<C++_compiler>
cd EnumVal
gmake

This will create the object files in the current directory and the executable named EnumVal in ' xerces-c-1_2_0-linux/bin' directory.

To delete all the generated object files and executables, type

gmake clean

Running EnumVal
 

This program parses a file, then shows how to enumerate the contents of the validator pools. To run EnumVal, enter the following

EnumVal <XML file>

Here is a sample output from EnumVal

cd xerces-c-1_2_0-linux/samples/data
EnumVal personal.xml

ELEMENTS:
----------------------------
  Name: personnel
  Content Model: (person)+

  Name: person
  Content Model: (name,email*,url*,link?)
  Attributes:
    Name:id, Type: ID

  Name: name
  Content Model: (#PCDATA|family|given)*

  Name: email
  Content Model: (#PCDATA)*

  Name: url
  Content Model: EMPTY
  Attributes:
    Name:href, Type: CDATA

  Name: link
  Content Model: EMPTY
  Attributes:
    Name:subordinates, Type: IDREF(S)
    Name:manager, Type: IDREF(S)

  Name: family
  Content Model: (#PCDATA)*

  Name: given
  Content Model: (#PCDATA)*



Copyright © 2000 The Apache Software Foundation. All Rights Reserved.