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

  • 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/…
    – bdoughan
    Apr 11, 2012 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.
    – mu_sa
    Apr 11, 2012 at 11:45

1 Answer 1


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.

Your Answer

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

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