From: Jonathan Fagan Date: 2012-09-12T07:39:00+09:00 Subject: Re: please help me with making script --f46d043bd88acb1ffc04c974b802 Content-Type: text/plain; charset=ISO-8859-1 try modifying your XPath to use the following (worked for me using nokogiri) "//*[@id='lblbirthday']" and "//*[@id='lblsexe']" On Tue, Sep 11, 2012 at 3:16 PM, Charmaine Willemsen wrote: > In this example i like to parse birthday and sexe > > >
> > 6 apr 1961 >
>
> > Male >
> > ----------------------------------------------------------------------------- > > These ruby script will not work, please who can help me? > > options[:birthday] = find(:xpath, ".//span[contains(@id, > \"lblbirthday\")]").text > options[:sexe] = find(:xpath, ".//span[contains(@id, > \"lblsexe\")]").text > > -- > Posted via http://www.ruby-forum.com/. > > --f46d043bd88acb1ffc04c974b802 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable try modifying your XPath to use the following (worked for me using=A0nokogi= ri)

"//*[@id=3D'lblbirthday']"

and

"//*[@id=3D'lblsexe= ']"



On Tue, S= ep 11, 2012 at 3:16 PM, Charmaine Willemsen <lists@ruby-forum.com= > wrote:
In this example i like to parse birthday and= sexe


<div class=3D"floatleft">
=A0 =A0 =A0 <label for=3D"lblbirthday" id=3D"lblbirthdayL= abel">birthday</label>
=A0 =A0 =A0 <span id=3D"lblbirthday">6 apr 1961</span>= ;
=A0 =A0 </div>
=A0 =A0 <div class=3D"floatleft" style=3D"margin-left: 50= px;">
=A0 =A0 =A0 <label for=3D"lblsexe" id=3D"lblsexeLabel&quo= t;>sexe</label>
=A0 =A0 =A0 <span id=3D"lblsexe">Male</span>
=A0 =A0 </div>
---------------------------------------------------------------------------= --

These ruby script will not work, please who can help me?

options[:birthday] =A0 =A0 =A0=3D find(:xpath, ".//span[contains(@id,<= br> \"lblbirthday\")]").text
options[:sexe] =A0 =A0 =A0 =A0 =A0=3D find(:xpath, ".//span[contains(@= id,
\"lblsexe\")]").text

--
Posted via http://= www.ruby-forum.com/.


--f46d043bd88acb1ffc04c974b802--