hi , i cant succeed add variable in xpath (libxml) brand = "037" xpath = "//Root/Stk[@Category=''601'' and @Brand=#{brand}]" stack = node.find(xpath) i used #{brand} but doesnt work
i solved thanks :) On Jun 10, 2:02 pm, lecielbleu <canal...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> hi , > i cant succeed add variable in xpath (libxml) > brand = "037" > xpath = "//Root/Stk[@Category=''601'' and @Brand=#{brand}]" > stack = node.find(xpath) > > i used #{brand} but doesnt work
You should post your solution for someone else''s future reference. On Jun 10, 8:27 am, lecielbleu <canal...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> i solved thanks :) > > On Jun 10, 2:02 pm, lecielbleu <canal...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > hi , > > i cant succeed add variable in xpath (libxml) > > brand = "037" > > xpath = "//Root/Stk[@Category=''601'' and @Brand=#{brand}]" > > stack = node.find(xpath) > > > i used #{brand} but doesnt work