XML::Xerces Sample: SEnumVal
Sample: SEnumVal
SEnumVal
SEnumVal shows how to enumerate the markup decls in a Schema Grammar.
Running SEnumVal
This program parses the specified XML file, then shows how to enumerate the contents of the Schema Grammar.
Usage:
perl SEnumVal.pl <XML file>
This program parses a file, then shows how to enumerate the
contents of the Schema Grammar. Essentially, shows how one can
access the Schema information stored in internal data structures.
Here is a sample output from SEnumVal
cd samples
perl SEnumVal.pl personal-schema.xml
Found Grammar: XML::Xerces::SchemaGrammar=HASH(0x82e9aa8)
Found Elements
Element Name: personnel, Content Model: (person,)
Element Name: person, Content Model: ((name,email,url),link)
Element Name: name, Content Model: (family,given)
Element Name: family, Content Model:
Element Name: given, Content Model:
Element Name: email, Content Model:
Element Name: url, Content Model: EMPTY
Element Name: link, Content Model: EMPTY
personal-schema.xml: duration: 0 wallclock secs ( 0.00 usr + 0.00 sys = 0.00 CPU)

