I’m working in Python with HTML that looks like this. I’m parsing with lxml, but could equally happily use pyquery:
<p><span class="Title">Name</span>Dave Davies</p>
<p><span class="Title">Address</span>123 Greyfriars Road, London</p>
Pulling out ‘Name’ and ‘Address’ is dead easy, whatever library I use, but how do I get the remainder of the text – i.e. ‘Dave Davies’?
Each Element can have a text and a tail attribute (in the link, search for the word “tail”):