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?
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?
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
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.
Hi
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?Originally Posted by narsis1313
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.
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.
OK!!!
Thanx for your help jbetancourt.
Sincerely.