From: Phlip Date: 2010-09-13T14:15:10+09:00 Subject: Re: #{} in xpath > Next, sometimes in xpath land you need to inject strings containing ' > or " or other shenanigans. Then you need an xpath expander, not a Ruby > string expander. I SUSPECT you do that like this: that might need a >   doc.xpath( '//small/descendant::span[ @id = "yfs_t10_$str" ]', nil, >                                    { :str => str } ) to skip the 'namespaces' argument there...