commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Zsolt Koppany" <zkoppanyl...@intland.com>
Subject AW: AW: How to get the entire string with Configuration.getString
Date Wed, 30 Mar 2005 14:14:37 GMT
Sorry, but this doesn't work with 1.1RC2.

XMLConfiguration config = new XMLConfiguration();
AbstractConfiguration.setDelimiter('\uffff');
char del = AbstractConfiguration.getDelimiter();
log.debug("Delimiter <" + del + ">");
config.setFile(file);
config.load();

CompositeConfiguration cc = new CompositeConfiguration(config);
configuration = cc;

Zsolt

> -----Ursprüngliche Nachricht-----
> Von: Emmanuel Bourg [mailto:ebourg@apache.org]
> Gesendet: Mittwoch, 30. März 2005 14:30
> An: Jakarta Commons Users List
> Betreff: Re: AW: How to get the entire string with Configuration.getString
> 
> You can also disable the string splitting by changing the delimiter to a
> char unlikely to be found in your configuration:
> 
> XMLConfiguration conf = new XMLConfiguration();
> conf.setDelimiter('\uffff');
> conf.setFilename("conf.xml");
> conf.load();
> 
> We will have a cleaner solution when Bug 29716 is fixed
> (http://issues.apache.org/bugzilla/show_bug.cgi?id=29716)
> 
> Emmanuel Bourg
> 
> 
> Zsolt Koppany wrote:
> > Thank you Oliver,
> >
> > unfortunately I cannot do that because we have to assure compatibility
> (with
> > the version where we didn't use commons-configuration), thus here is my
> > code:
> >
> > List exprs = config.getList("scc[@task_expression]");
> > if (!exprs.isEmpty())
> > {
> >    sccTaskIdExpression = StringUtils.join(exprs.iterator(), ",").trim();
> > }
> >
> > Is not nice but works.
> >
> > Zsolt
> 
> ---------------------------------------------------------------------
> 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


Mime
View raw message