How to match style="display:none"

1 view
Skip to first unread message

rainkinz

unread,
Apr 24, 2009, 3:09:11 PM4/24/09
to whytheluckystuff
Hi,

I have am trying to match the following with hpricot:

<div class="cy-figure" id="cy_replace_fig_ref_fig1_uuid-1"
style="display:none;"></div>

I have the following selector:

hdoc.search("div#cy_replace_fig_ref_fig1_uuid-1
[@style='display:none;']")

but I don't find anything. If I change to

hdoc.search("div#cy_replace_fig_ref_fig1_uuid-1[@style^='display']")

It matches, but

hdoc.search("div#cy_replace_fig_ref_fig1_uuid-1
[@style^='display:none']")

doesnt.

Any ideas?

Thanks
Reply all
Reply to author
Forward
0 new messages