How to implement a circuit from an XML schema using Java with a database

What is the best way to implement roundtrip to retrieve XML files and, ultimately, save data to a database using Java. Currently I have:
1. The XML schema and XML data files are sent to me
- XSD is quite complex and belongs to the outside, so I can’t change it
2. Java classes are created
- JAXB generates more than 150 classes, unfortunately, the schema can change - I used Maven POM to automate the process 3. Unmarshall XML data files into Java objects (with JAXB annotation)
- the data will be displayed to the user who needs to be manipulated
4. Reassign Java objects to RDBMS (Oracle / MySQL)
- it looks like JDO is the most suitable solution
5. Export data
- Data can be exported again as XML or Excel (for example)

I cannot find a suitable way to add JDO metadata or annotations to the Java source code (generated during the JAXB process) so that I can save Java classes. I work with the following technologies:
- Java, Maven, JAXB, JDO and JDBC

I think DataNucleus would be the most suitable, since I might have to change data warehouses (RDBMS / XML / Excel) often between environments with different export points. The only other two technologies that I may need are: - Spring and XDoclet

Tip or pointer to a tutorial will be appreciated

+3
source share
2 answers

roundtrip XML Java.

JAXB JAXB. : EclipseLink JAXB (MOXy), EclipseLink JPA-.

:

1 - XML- XML

  • XSD ,

№1 - XML-

  • XML-, JAXB XML-.

№2 - Java

2 - Java

  • JAXB 150 , ,
  • Maven POM .

XML XML-.

HyperJAXB, , JPA JAXB.

3 - Unmarshall XML- Java ( JAXB )

  • , .

JAXB. :

4 - Java RDBMS (Oracle/MySQL)

  • , JDO .

JPA - .

5 -

  • XML Excel ()

, JAXB XML-.

+1

Java, JAXB, XML , IMHO. - , .

, XML-, , clob - .

, , JDO, , -, JAXB JDO .

, , , .

0

Source: https://habr.com/ru/post/1795422/


All Articles