commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jung, Eric" <Eric.J...@Arbella.com>
Subject [Configuration]
Date Thu, 16 Sep 2004 20:24:54 GMT
Hi,
When I specify an XMLConfiguration with <additional/> using
ConfigurationFactory, XML attributes are accessible via dotted notation;
e.g., <foo bar="moo"/> is accessible using
configuration.getString("foo.bar").

However, when I use an XMLConfiguration directly, like so:

  Configuration configuration = new XMLConfiguration(new
File("/hello.xml"));

XML attributes are only accessible with XPath-style attribute notation;
e.g., <foo bar="moo"/> is accessible using
configuration.getString("foo[@bar]").

My question is: how can I use XMLConfiguration without ConfigurationFactory,
but still access attributes using dotted notation?

Thank you for any help.

Sincerely,
Eric Jung

---------------------------------------------------------------------
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