commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rob Elliott" <relli...@MarchNetworks.com>
Subject RE: XMLConfiguration - getString truncated by comma
Date Tue, 15 Dec 2009 21:17:59 GMT
That's worked just fine. Thank you.

-----Original Message-----
From: Oliver Heger [mailto:oliver.heger@oliver-heger.de] 
Sent: Tuesday, December 15, 2009 4:02 PM
To: Commons Users List
Subject: Re: XMLConfiguration - getString truncated by comma

Rob Elliott schrieb:
> I call getString(key);  on my XMLConfiguration object which invokes
the
> inherited AbstractConfiguration method. The string in the XML file is:
> 
>  
> 
> "{1e68f760-6765-439e-8f38-94d7792ef860,1}" but getString(key)  returns
> "{1e68f760-6765-439e-8f38-94d7792ef860". I assume that the comma is
the
> culprit. Is there a way to change my key so that the entire string is
> returned?
> 

Before you load the XMLConfiguration call the 
setDelimiterParsingDisabled() method with *true* as parameter, for
instance:

XMLConfiguration config = new XMLConfiguration();
config.setDelimiterParsingDisabled(true);
config.load(myFile);

You are right that the comma is interpreted as list delimiter per 
default. With the setDelimiterParsingDisabled() method you can switch 
off this behavior.

Oliver

>  
> 
> Rob.
> 
> 


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




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


Mime
View raw message