#ruby-lang - Thu 12 Apr 2007 between 01:23 and 01:41

NY Lost Funds



LoganCapaldoshit.
teferiyeah
jtoy_does hpricot support tbody?
teferium, why wouldn't it?
jtoy_not sure, I am getting the xpath with firebug and then I print it out in hpricot and get an empty string returned
teferijtoy_: the tbody isn't a real tag
or, rather, it's not in the original html
firefox's rendering engine put it there
jtoy_so is there a simple way to convert /html/body/table/tbody/tr/td into something hpricot can use?
actionLoganCapaldo has seen html w/ tbody
LoganCapaldohas seen html w/ tbody
teferijtoy_: yes, drop the 'tbody'
the tbody isn't /in/ the original source
firebug is lying to you
jtoy_yeah, I just checked the source, there is no tbody
I'm not a "html master" how else can I easily find the element I am looking for?
teferijtoy_: just /html/body/table/tr/td
in that case
just drop the tbody from the xpath
firefox inserts tbodies after tables
if they're not there
I don't see how else I can put this
Austin--um.
teferi: http://www.december.com/html/4/element/tbody.html
teferiAustin--: yes, it is a real element
Austin--: but what I'm saying is that firefox will insert it into its internal representation if the element isn't actually on the page
Austin--or, if you prever: http://www.w3.org/TR/html401/struct/tables.html
IOW, ffox is normalizing the table structure.
teferiyes
but the point is, if you query the page with an xpath with that tbody in it, it'll fail, because there's no such element on the page
jtoy_brb, my irc client is dying dont talk too much about it with me not here!!
LoganCapaldotheres nothing left to talk about
just don't put tbody in yer xpath
teferiyeah
LoganCapaldoI always speak with an accent online
jtoy_hmm, in hpricot the arrays start at 1? so /html/body/table[1] is the 1st table as opposed to /html/body/table[0] ?
LoganCapaldos/hpricot/xpath/
jtoy_oh, its an xpath thing? I dont know that much about how the actual parsing works
teferiwhat LoganCapaldo said
xpath is funky
LoganCapaldoits not the parsing

Page: 1 8 15 22 29 36 43 50 57 64 71 78 

IrcArchive

NY Lost Funds