Get part of a child node?
Posted: Sat Jul 10, 2010 2:02 pm
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?
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?