You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by ribbey101 <sb...@tsgrp.com> on 2008/07/18 15:02:08 UTC
How to write a HierarchicalConfiguration to the file system?
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
--
View this message in context: http://www.nabble.com/How-to-write-a-HierarchicalConfiguration-to-the-file-system--tp18528692p18528692.html
Sent from the Commons - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org
Re: How to write a HierarchicalConfiguration to the file system?
Posted by ribbey101 <sb...@tsgrp.com>.
ribbey101 wrote:
>
> 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.
>
> Or do I have to just using something like DOM for now?
>
> Thanks!
> Shana
>
--
View this message in context: http://www.nabble.com/How-to-write-a-HierarchicalConfiguration-to-the-file-system--tp18528692p18529795.html
Sent from the Commons - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org
Re: [configuration] How to write a HierarchicalConfiguration to the
file system?
Posted by Oliver Heger <ol...@oliver-heger.de>.
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