Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I am new to JavaEE and am faced with a tight situation here.

I have to develop a Java application for (CRUD) handling records and saving and loading an XML concerning that record. Obviously, I won't be asking you to do this for me. What I would be asking you is to give me some hints/pointer. Initially I thought JAXB would be enough for this but after putting a lot of time learning it and implementing the program I realized that it just can create the XML and read it but for update, delete I would have to do something else. Even if it wasn't for update and delete features requirement for my project I would still think that by just using JAXB is not a good implementation.

I was wondering if "REST with Java (JAX-RS) using Jersey" should do the trick for me. ?

share|improve this question
    
Do you want the data persisted as XML, or just the interactions to be in XML? Here is a link to a JAX-RS application where JAXB is leveraged for the XML messages and the persistence is done to a relational database leveraging JPA: blog.bdoughan.com/2010/08/… –  Blaise Doughan Apr 11 '12 at 10:30
    
Thanks for taking the time to read my question. I did not completely undertsood your answer but would tell you what exactly i am planning to make a java application which takes input from command line to create a xml file then one can update the xml file with putting/editing records, read the xml file and delete a entry in the xml file. –  LivingThing Apr 11 '12 at 11:45
add comment

1 Answer

JAX-RS isn't really going to help you for this. Much as JAX-B is for binding and unbinding XML to Java, JAX-RS is about building and consuming RESTful services. Neither really deals with data persistence.

What you need to look at is an XML database, such as BaseX, which allows you to use XQuery to query and manipulate your XML.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.