You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Michiel Kalkman <mi...@gmail.com> on 2009/03/31 15:42:55 UTC
[commons-config]: setting listdelimiters
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
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org
Re: [commons-config]: setting listdelimiters
Posted by Oliver Heger <ol...@oliver-heger.de>.
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