commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eric Pugh" <ep...@upstate.com>
Subject RE: [Configuration]
Date Mon, 20 Sep 2004 16:11:12 GMT
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:hegero@med.uni-marburg.de]
> 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:
> > 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
> >
> >
>
>
> --
> 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:oliver.heger@med.uni-marburg.de
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org


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