view article

Figure 1
Using XMLBeans to load, save and validate data. XMLBeans is an XML–Java binding, which generates Java classes and interfaces from XML schemas. The generated Java classes are used to parse or generate an XML document that conforms to the schema: the application implements the Java classes and generates a content tree of data objects representing the structure and content of a source XML document. From the Java objects, we can load, modify, validate and save XML data. Loading: before loading a file, the program checks if the file is valid. It parses the XML data to a Java instance that can be manipulated. Saving: when the user enters values via the interface, they can be saved into an XML file. The program checks if all the mandatory fields are completed and are correct. XMLBeans creates a Java instance and then serializes it to an XML file.

Journal logoJOURNAL OF
APPLIED
CRYSTALLOGRAPHY
ISSN: 1600-5767
Follow J. Appl. Cryst.
Sign up for e-alerts
Follow J. Appl. Cryst. on Twitter
Follow us on facebook
Sign up for RSS feeds