main
public static void main(java.lang.String[] args)
throws java.lang.Exception
Demonstration program to unmarshal an XML file to a custom Java AST
and marshal the AST back to XML again. ASTReader is instructed to map
XML to Java classes from the package "uk.ac.sheffield.jast.test" and
then reads the input file "Catalogue.xml" into an AST, which is rooted
in the user-defined class "Catalogue". ASTWriter is instructed to use
the same Metadata as ASTReader, then marshals the AST back to the file
"Catalogue_Marshal.xml". The Metadata object is then examined to list
its namespace-to-package mappings, its XML-to-Java name mappings and
its metadata attribute mappings.
- Parameters:
args
- are ignored.
- Throws:
java.lang.Exception
- if an error occurs.