Runtime binding of XML Schema to Java code
Posted
by Yaneeve
on Stack Overflow
See other posts from Stack Overflow
or by Yaneeve
Published on 2010-03-31T13:09:38Z
Indexed on
2010/03/31
13:13 UTC
Read the original article
Hit count: 431
Hi all,
The situation is thus:
I have an application which provides editing capabilities to XML an file. This file follows a certain Schema. The Schema belongs to a subset of Schemas which actually follow a line of evolution from one to another - so they are not so different from one another.
The main difference between the schemas is an enumeration of string labels.
I now have need to save "meta data" in XML format (This is a second type of XML file). This "meta data" contains a list of labels from the set enumerated in the schema.
The application can accept a new schema at runtime and adjust itself.
Therefore I have an XML file that must be validated by two schemas one static containing the basic structure of the "meta data" stored in the XML and one which contains the 'proper' label enumeration. The latter schema is determined at runtime.
I have glanced over JAXB, XMLBeans and JiBX.
I can't figure out what technology to choose that would allow for a runtime bind of code and schema in the way that would most benefit my use-case.
Any suggestions?
Thanks!
© Stack Overflow or respective owner