|
|
SPASE XML Parser
The SPASE XML parser is a collection of Java classes which can parse XML descriptions and
load the information into a directly accessible form. The SPASE data model is organized into
multiple groupings (resource) of information. In this implementation each grouping has
a corresponding Java class. An envelope class called "Description" can load, parse and create
a corresponding collection of other classes to represent the XML file. During parsing a syntactical
validation is performed (i.e., are tag balanced, etc), recognized tags are processed and unrecognized
tags are ignored.
There is a "classic" and "JAXB" version of the parser. Both version provide similiar functionality.
The "classic" version is generated using a in-house tool.
The "JAXB" version is generated using version 2.0 of the
JAXB compiler.
To use the JAXB version you will also need the jar files included in the JAXB
reference implementation.
The "JAXB" version is preferred. Versions labeled "draft" are not considered stable.
Documentation
- On-line class descriptions for the parser collection.
-
Classic versions (spase.parser*): 1.1.0
1.2.0
1.2.1
1.2.2
2.0.0
JAXB versions (org.spase.parser*): 1.1.0
1.2.0
1.2.1
1.2.2
2.0.0
-
Draft versions:
Classic versions (spase.parser*):
1.3.0 (draft)
1.3.4 (draft)
JAXB versions (org.spase.parser*):
1.3.0 (draft)
1.3.4 (draft)
Application
- Jar files:
-
Classic versions (spase.parser*):
1.1.0
1.2.0
1.2.1
1.2.2
2.0.0
JAXB versions (org.spase.parser*):
1.1.0
1.2.0
1.2.1
1.2.2
2.0.0
-
Draft Versions:
Classic versions (spase.parser*):
1.3.0 (draft)
1.3.4 (draft)
JAXB versions (org.spase.parser*):
1.3.0 (draft)
1.3.4 (draft)
The jar files contain source, documentation and compiled classes that implement the parser.
- After downloading the classic version the command:
java spase.parser{ver}.Description {xmlfil}
will parse and display the contents of {xmlfile} using parser version {ver}.
For example, possible values for {ver} is "110" for version 1.1.0 and "120" for version 1.2.0.
Note: The class files were compiled using JDK1.5 and the source code uses features found only in JDK1.5 and above.
Example XML (Version 1.1.0 compliant)
- For each resource type:
- Catalog.xml
- DisplayData.xml
- Instrument.xml
- NumericalData.xml
- Observatory.xml
- Person.xml
- Registry.xml
- Repository.xml
- Service.xml
|