Page 1 of 1

Get part of a child node?

Posted: Sat Jul 10, 2010 2:02 pm
by roasthawg
So I'm scraping a table from a website and one of the rows looks like this: <td class="name">text1<em>text2</em></td>.

I can't figure out how to get the "text1" into one variable and the "text2" into another. The "text2" is easy enough to extract but the "text1" comes with the "text2" attached to it. I can remove the child but then the "text2" information is lost. Any ideas?

Re: Get part of a child node?

Posted: Sat Jul 10, 2010 3:43 pm
by requinix
Depends how you're extracting all that.

(That's a hint for you to post your code.)