Results 1 to 7 of 7

Thread: Read/Write to XML file

  1. #1
    Join Date
    Oct 2004
    Posts
    8

    Default Read/Write to XML file

    I have the need to read *and* update an xml file. Something like you would do if using apache xmlbeans. I'm aware of Spring's ability to read map elements, etc. from the app context but I really just want an easy way to marshal an xml file into a javabean and then write the updates back to that xml file. What's the best way to do this?

    I saw some documentation about a wrapper class for xmlbeans but it looks as it is deprecated.

    Any help is appreciated.

    Thanks,
    Mike

  2. #2
    Join Date
    Sep 2006
    Location
    UK
    Posts
    8,424

    Default

    I have read a few threads that talk about writing out the applicationContext, but I've not seen any solutions as yet.

  3. #3
    Join Date
    Mar 2007
    Location
    Chennai, India
    Posts
    53

    Default

    better go for the age old SAXParser, DOMParser for reading/writing XML files using Java.

  4. #4
    Join Date
    Sep 2006
    Location
    UK
    Posts
    8,424

    Default

    It might be worth hunting down the threads I mentioned to see if there were any thoughts that might have been useful in solving the problem.

  5. #5
    Join Date
    Aug 2004
    Location
    Amsterdam, Netherlands
    Posts
    450

    Default

    You might want to take a look at Spring Web Services. The Object-XML mapping functionality there should help you there. I've asked Arjen to tune in as well...
    Alef Arendsen
    SpringSource
    http://www.springsource.com

  6. #6
    Join Date
    Sep 2006
    Location
    UK
    Posts
    8,424

    Default

    It would be great if there was a good solution for this one. It has been asked quite a few times in the past few months and is a pretty good candidate for an FAQ question.

  7. #7
    Join Date
    Jul 2005
    Location
    Rotterdam, the Netherlands
    Posts
    1,562

    Default

    You can find information about the O/X mapping framework here: http://static.springframework.org/sp...html/ch05.html
    Arjen Poutsma

    Spring Web Services Dev Lead
    Please read the FAQ

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •