You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Mark Chaimungkalanont <ma...@atlassian.com> on 2006/10/31 02:46:34 UTC

[configuration] Outputting CombinedConfiguration as XML

Guys,

I have a CombinedConfiguration created from two XmlConfiguration objects. I want to output 
the combined XML of the CombinedConfiguration. Is this possible? Does anyone know either way?

I had a look through the mail archives but seemed to have come up blank, and there were no 
obvious ways from the API that I could see.

Any help would be much appreciated!

Cheers,

Mark C

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


Re: [configuration] Outputting CombinedConfiguration as XML

Posted by Mark Chaimungkalanont <ma...@atlassian.com>.
Oliver,

Thanks for the pointer. I've created an issue for this at: 
http://issues.apache.org/jira/browse/CONFIGURATION-236

Cheers,

Mark C

Oliver Heger wrote:
> Mark Chaimungkalanont wrote:
>> Guys,
>>
>> I have a CombinedConfiguration created from two XmlConfiguration 
>> objects. I want to output the combined XML of the 
>> CombinedConfiguration. Is this possible? Does anyone know either way?
>>
>> I had a look through the mail archives but seemed to have come up 
>> blank, and there were no obvious ways from the API that I could see.
>>
>> Any help would be much appreciated!
>>
>> Cheers,
>>
>> Mark C
>>
> 
> 
> Mark,
> 
> there really seems to be no simple solution for your problem, at least 
> none I can see. For flat (i.e. non hierarchical configurations) the 
> copy() method of ConfigurationUtils could be used, but this method does 
> not work well for hierarchical configurations.
> 
> Your use case sounds very reasonable to me. So would you mind opening an 
> enhancement request in our bug tracking tool jira [1]? I think it should 
> be possible to somehow initialize a hierarchical configuration object 
> with the data of another hierarchical configuration. This would also 
> solve your problem.
> 
> Thanks
> Oliver
> 
> [1] http://jakarta.apache.org/commons/configuration/issue-tracking.html
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
> 

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


Re: [configuration] Outputting CombinedConfiguration as XML

Posted by Oliver Heger <ol...@oliver-heger.de>.
Mark Chaimungkalanont wrote:
> Guys,
> 
> I have a CombinedConfiguration created from two XmlConfiguration 
> objects. I want to output the combined XML of the CombinedConfiguration. 
> Is this possible? Does anyone know either way?
> 
> I had a look through the mail archives but seemed to have come up blank, 
> and there were no obvious ways from the API that I could see.
> 
> Any help would be much appreciated!
> 
> Cheers,
> 
> Mark C
> 


Mark,

there really seems to be no simple solution for your problem, at least 
none I can see. For flat (i.e. non hierarchical configurations) the 
copy() method of ConfigurationUtils could be used, but this method does 
not work well for hierarchical configurations.

Your use case sounds very reasonable to me. So would you mind opening an 
enhancement request in our bug tracking tool jira [1]? I think it should 
be possible to somehow initialize a hierarchical configuration object 
with the data of another hierarchical configuration. This would also 
solve your problem.

Thanks
Oliver

[1] http://jakarta.apache.org/commons/configuration/issue-tracking.html

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