commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vladimir Stevanovic <>
Subject [configuration] backslash escaping
Date Thu, 09 Jun 2011 09:05:51 GMT
I'm using XMLConfiguration with XPathExspressionEngine and I noticed a
strange bahavior of configuraiton framework

XMLConfiguration config = new XMLConfiguration();
config.setExpressionEngine(new XPathExpressionEngine());
if (!config.containsKey("paths")) {
    config.addProperty(" paths", "");
if (!config.containsKey("paths/path")) {
    config.addProperty("paths path", "c:\\some\\path");
}else {
    config.setProperty("paths/path", "c:\\some\\other\\path");

Afrer running the code above for the first time, created xml file has
to following line:

But afrer running again the line looks like this:


It seems that setProperty is performing some kind of escaping. What's
the reason for that?

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message