0

I have a table in PosgreSQL. I have an xml schema.

I want to create an xml document with this schema and data from Postgre.

What should I read to work with xsd in java? And what are the best tools to use?

UPDATE

More specific question. Can i create data base in PostgreSql using xml schema?

UPDATE 2

Okey. I create data base from .xsd using XMLSpy.
Now i need load xml document in this data base. What i gonna do?

UPDATE 3

Okay. I generate java classes using JiBX.
Now i want to read xml file and write data from this to data base. What i gonna do?

Kliver Max
  • 5,107
  • 22
  • 95
  • 148
  • 2
    Welcome to Stack Overflow! We encourage you to [research your questions](http://stackoverflow.com/questions/how-to-ask). If you've [tried something already](http://whathaveyoutried.com/), please add it to the question - if not, research and attempt your question first, and then come back. –  Aug 10 '12 at 08:46
  • Ok, i gonna be more specific. – Kliver Max Aug 10 '12 at 09:14

3 Answers3

2

Probably best to generate java classes for the XML from the XSD, you can read about it here: Generate Java classes from .XSD files...?

Community
  • 1
  • 1
Tom
  • 43,583
  • 4
  • 41
  • 61
2

I dont know anything about the postgreSql, but i will suggest you to generate java classes from your Xsd using jaxb and use those classes as domain for your db.

Sikorski
  • 2,653
  • 3
  • 25
  • 46
0

yes, the best way to accomplish the above task would be to generate java class and populate your respective beans. From there on you can insert your values of beans to the respective tables in posgresql

saurabh j
  • 89
  • 1
  • 1
  • 7