New way to search by attribute value in REXML on ruby 1.8.6?

Hi,

I’ve been previously using things like:

stuff = infdata.elements[“domain:contact[@type=‘admin’]”].text

quite heavily.

Upgrading to ruby 1.8.6 make this return a blank string.

I’m using Gentoo’s ruby ebuild, which I assume would patch any bugs,
so I’m guessing there’s a new way to do it.

Anybody know how I can search for a sub-element with a particular
attribute value as above in ruby 1.8.6’s REXML?

Thanks

2008/2/5, ayqazi [email protected]:

I’m using Gentoo’s ruby ebuild, which I assume would patch any bugs,
so I’m guessing there’s a new way to do it.

Anybody know how I can search for a sub-element with a particular
attribute value as above in ruby 1.8.6’s REXML?

Maybe you have become a victim of a bug fix:

16:59:59 /cygdrive/c/Temp
$ ./xp.rb
1.8.6
<domain:contact type=‘admin’/>

17:00:03 /cygdrive/c/Temp
$

Script attached.

Kind regards

robert