Results 1 to 7 of 7

Thread: Read / Write Beans

  1. #1
    Join Date
    Dec 2004
    Posts
    7

    Default Read / Write Beans

    Hello.

    I want to write a java program that opens an XML file containing any
    beans, show them and their properties to me, allow me to change some
    of properties and again, save the XML file with changes.

    Would you please help me?

  2. #2
    Join Date
    Aug 2004
    Location
    Southampton, UK
    Posts
    826

    Default

    What help do you need exactly?

    Spring will allow you to read beans in from an XML file and then you can use Introspection to find out their values, but Spring won't help you to persist any property changes back to file. For that you would need to extend Spring and add the persistence code yourself.

    Rob

  3. #3
    Join Date
    Dec 2004
    Posts
    7

    Default

    OK!
    Thanx for your help, but how, can i do the first part (reading the contents
    of an xml file, getting it's beans and their definitions)?

    Sincerely,

    Narsis.

  4. #4
    Join Date
    Aug 2004
    Posts
    9

    Default

    Hi

    Quote Originally Posted by narsis1313
    OK!
    Thanx for your help, but how, can i do the first part (reading the contents
    of an xml file, getting it's beans and their definitions)?

    Sincerely,

    Narsis.
    The first part is easy ... You can do it either through the ClassPathXmlApplicationContext or FileSystemXmlApplicationContext class. But what I don't understand is why is there a need to change its properties and save it back to the xml file again? Are you trying to do some sort of "dynamic" bean?

  5. #5
    Join Date
    Dec 2004
    Posts
    7

    Default

    Hi.
    OK! I want to write a visual program that allows the programmer to
    load a xml file, see the beans defined in it in a JTree,
    select a bean in the JTree and see it's properties and if want, change
    them and at last, save the changes in the original xml file.

    Sincerely,

    Narsis.

  6. #6
    Join Date
    Aug 2004
    Location
    u.s.a
    Posts
    399

    Default

    This does not seem to be Spring related?

    There is the Spring IDE Eclipse plug-in that does great stuff, then there are some Bean documentation projects coming around.

    What you describe seems like a generic requirement. A web search shows many references, for example, http://www.devx.com/getHelpOn/10MinuteSolution/16694

    A 'subject' for this would be XML binding and editing. Many frameworks for this.

  7. #7
    Join Date
    Dec 2004
    Posts
    7

    Default

    OK!!!

    Thanx for your help jbetancourt.

    Sincerely.

Similar Threads

  1. Order of Bean definitions matters?
    By cfuser in forum Container
    Replies: 2
    Last Post: Oct 21st, 2005, 10:29 AM
  2. Spring container fails with no exception
    By naor in forum Container
    Replies: 9
    Last Post: Oct 1st, 2005, 03:39 PM
  3. EHCaching Hibernate
    By dencamel in forum Data
    Replies: 3
    Last Post: Sep 6th, 2005, 09:03 PM
  4. Replies: 4
    Last Post: Aug 17th, 2005, 04:42 AM
  5. Stack Overflow
    By rayho222 in forum Container
    Replies: 6
    Last Post: May 17th, 2005, 03:42 AM

Posting Permissions

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