Eric,
sorry, I wasn't clear about that. What I meant was that attributes must be accessed in an XPath-like notation like "[EMAIL PROTECTED]" rather than a dot-notation like "property.attribute".
Unfortunately we do not have further support for XPath queries. I have been working on extracting the code that evaluates configuration key expressions. I created an interface named ExpressionEngine. The goal is that such an expression engine can be plugged into a Configuration object thus supporting arbitrary expression languages. This could be a strarting point.
Oliver
Eric Pugh wrote:
Oliver,
Can I use any xpath notiation? I was under the impression that the notation was "xpath-like", not actual xpath? I was loading up a web.xml as a XML doc, but really wanted to load it up as a Configuration object instead... I did it because I needed too use xpath to query specific nodes..
Eric
-----Original Message----- From: Oliver Heger [mailto:[EMAIL PROTECTED] Sent: Friday, September 17, 2004 7:47 AM To: Jakarta Commons Users List Subject: Re: [Configuration]
Attributes in XML files should always be accessible using XPath notation, regardless if loaded directly or via ConfigurationFactory. There was a bug in the class HierarchicalConfigurationConverter, which possibly caused the behavior you are reporting, but it was fixed some time ago.
Unless you already use it, could you try again with the latest CVS version? If this doesn't solve your problem, you should open a bugzilla ticket.
Oliver
Jung, Eric wrote:
ConfigurationFactory,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("[EMAIL PROTECTED]").
My question is: how can I use XMLConfiguration without
but still access attributes using dotted notation?
Thank you for any help.
Sincerely, Eric Jung
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
-- Dipl.-Inform. Oliver Heger Zentrale Informationsverarbeitung (ZIV) / Bereich Anwenderverfahren Klinikum der Philipps-Universit�t Marburg Bunsenstra�e 3, D-35037 Marburg Tel: +49 6421 28-66592 mailto:[EMAIL PROTECTED]
---------------------------------------------------------------------
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]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
