You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Oliver Heger <ol...@oliver-heger.de> on 2008/07/19 16:30:21 UTC
Re: [configuration] How to write a HierarchicalConfiguration to the
file system?
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