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: [commons-config]: setting listdelimiters
Date Tue, 31 Mar 2009 17:58:36 GMT
Michiel Kalkman schrieb:
> Hi all,
> 
> It is possible to change the delimiters for lists in configurations
> using AbstractConfiguration::setDelimiterParsingDisabled() or
> AbstractConfiguration::setDefaultListDelimiter().
> 
> But this is in code.
> 
> Can someone tell me whether it is possible to provide the delimiter in
> the configuration itself, e.g. in an XML configuration  ?
> 
> Thanks and regards,
> Michiel
> 
The plain configuration classes like XMLConfiguration or 
PropertiesConfiguration do not support this, but using 
DefaultConfigurationBuilder (have a look at the user's guide [1]) it is 
possible to set arbitrary properties on the configuration sources 
declared in the definition file.

For instance, you could have something like the following:

<?xml version="1.0" encoding="ISO-8859-1" ?>
<configuration>
   <xml fileName="test.xml" delimiterParsingDisabled="true"/>
</configuration>

In this example parsing of list delimiters is disabled for the embedded 
XML configuration.

HTH
Oliver

[1] 
http://commons.apache.org/configuration/userguide/howto_configurationbuilder.html

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


Mime
View raw message