------art_10057_9385932.1202227263987
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

2008/2/5, ayqazi <ayqazi / iamnotgivingmyemailontheinternet.com>:
> Hi,
>
> I've been previously using things like:
>
> stuff  nfdata.elements["domain:contact[@type
dmin']"].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?

Maybe you have become a victim of a bug fix:

16:59:59 /cygdrive/c/Temp
$ ./xp.rb
1.8.6
<domain:contact type
dmin'/>
---
17:00:03 /cygdrive/c/Temp
$

Script attached.

Kind regards

robert


-- 
use.inject do |as, often| as.you_can - without end

------art_10057_9385932.1202227263987
Content-Type: application/x-ruby; name=xp.rb
Content-Transfer-Encoding: base64
X-Attachment-Id: f_fcan24dl
Content-Disposition: attachment; filename=xp.rb

IyEvYmluL2VudiBydWJ5CgpyZXF1aXJlICdyZXhtbC9kb2N1bWVudCcKCkNPTkQgPSAiLy9kb21h
aW46Y29udGFjdFtAdHlwZT0nYWRtaW4nXSIKCnB1dHMgUlVCWV9WRVJTSU9OCgpkb2MgPSBSRVhN
TDo6RG9jdW1lbnQubmV3IERBVEEKClJFWE1MOjpYUGF0aC5lYWNoKGRvYywgQ09ORCkgZG8gfGVs
bXwKICBwIGVsbQplbmQKCnB1dHMgIi0tLSIKCmRvYy5lbGVtZW50c1tDT05EXS5lYWNoIGRvIHxl
bG18CiAgcCBlbG0KZW5kCgpfX0VORF9fCjxmb28+CiAgPGRvbWFpbjpjb250YWN0IHR5cGU9ImFk
bWluIi8+CiAgPGRvbWFpbjpjb250YWN0IHR5cGU9ImZvbyIvPgo8L2Zvbz4K
------art_10057_9385932.1202227263987--