| [Home] [Software Engineering] [About] |
VOTable ParserThe VOTable XML document format is used by the Spitzer Archive to exchange information with the IRSA Atlas interface. The parser is based on the VOTable XML Schema definition and XMLBeans XML-Java binding tool. |
|
|
ContentsOverviewThe VOTable parser is based on the VOTable XML Schema definition and XMLBeans XML-Java binding tool. I have made a few slight modifications to 1.0 version VOTable XML Schema in order for it to pass the schema validation checks of the XMLBeans tooklit. This version can be downloaded here. The XMLBeans toolkit provides the capability to create a set of Java classes from XML schema that are capable of parsing, validating and generating XML documents. The generated code is intuitive in that the class and method names correspond with the XML schema definition names. The toolkit is cabable of handling both simple and complex (user-defined) data types. For more information on how this works see Java Types generated from User Derived Types and Java Methods for Types generated from Schema. ParserThe VOTable parser is packaged as a single Java Archive file and be downloaded at the link below: To use the parser it must be included in the Java virtual machine classpath. Sample UsageThe Java source file TestVOTable.java demonstrates the usage of the VOTable parser within the contex of a JUnit test case. The sample goes one step further and dynamically obtains the VOTable XML document from the IRSA Atlas service and performs a parse and validation on the contents. The remainder of the example demonstrates accessing various parts of the document. References
|
|
|
|
Last Update:
Monday, September 13, 2004 10:52 AM
|