How to replace " into space?
===

I get xml data and I get value from it.
<p>I need to delete symbols [ and ] 
<p>Here is my code, that gives me error about undegined variable:

             @xml = XmlSimple.xml_in(res.content)//here I get xml document
             payKey = @xml["payKey"]//gere I get needed value
             //it looks like "[some character]" so I need to delete [ and ]
             //I tried
             payKey = @xml["payKey"].to_s()//to use tr method
             payKey = payKey.tr("[]", "")//replacing
            redirect_to "https://svcs.sandbox.paypal.com/AdaptivePayments/Pay?cmd=_ap-payment&paykey=#{paykey}"//inserting into url

and result:

                svcs.sandbox.paypal.com/AdaptivePayments/Pay?cmd=_ap-payment&paykey="AP-7NK73769LH704515X"

So I need to delete " signs. Can someone help me ?