That's worked just fine. Thank you.
-----Original Message-----
From: Oliver Heger [mailto:[email protected]]
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: [email protected]
For additional commands, e-mail: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]