XML STORING PROJECT. How is best?
My application contains a set of model e.g. DocumentX2010, DocumentX2009, DocumentX2008...
Every year document changes persistance model.
More fields..
More details...
Some little difference... Every year I need to change the database column...
For next version of my project I want to change the architecture drastically. I want to store documents in XML format.
I search standard to design mi xml files: some like CDA2 (The HL7 Clinical Document Architecture is an XML-based markup standard intended to specify the encoding, structure and semantics of clinical documents for exchange.)
How is best s开发者_高级运维tandard?
How is it best framework to mapping my java classes to the XML file?
How is it best way to persist XML file into DB?
Looking for a standard for your document design is like looking for a standard for your database data model: The design is entirely dependent on your domain and application, there is no external answer (unless you are using a shared established standard, which do publish xsd's, and I reckon this is not your case).
I'd say the best way to serialize a Java class to xml would be to convert it into a bean and use xmlencoder.
For persisting, you may check xml databases if you are feeling adventurous. Otherwise, you can convert your beans into entity beans and use JPA.
精彩评论