commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oliver Heger <oliver.he...@oliver-heger.de>
Subject Re: [configuration] How to write a HierarchicalConfiguration to the file system?
Date Sat, 19 Jul 2008 14:30:21 GMT
First, this is a shared list. Please use the component you are 
interested in as prefix for your subject, as I have done now.

See below:

ribbey101 schrieb:
> Hi,
> 
> We have a spring-based web application which loads an apache commons
> HierarchicalConfiguration at application startup from a config.xml. We would
> like to be able to make changes to the HierarchicalConfiguration and then
> write it back to an xml on the filesystem.
> 
> I see a lot of information about loading the xml into memory, but haven't
> seen much about writing it back out to a filesystem. If someone could give
> me some tips on what I should use or where to look, it would be greatly
> appreciated.
> 
> Thanks!
> Shana

If you have loaded a configuration file in XML format, there must have 
been a XMLConfiguration instance involved. XMLConfiguration contains 
several save() methods for writing the properties contained back to 
disk. So you should use this object for saving your changes.

Oliver


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Mime
View raw message