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?

2
  • 2
    Welcome to Stack Overflow! We encourage you to research your questions. If you've tried something already, please add it to the question - if not, research and attempt your question first, and then come back. Commented Aug 10, 2012 at 8:46
  • Ok, i gonna be more specific. Commented Aug 10, 2012 at 9:14

3 Answers 3

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...?

Sign up to request clarification or add additional context in comments.

Comments

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.

1 Comment

jaxb needed for load xml files to Data Base or for create xml from DB?
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

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.