[[FrontPage]]
import lxml.etree
doc = lxml.etree.HTML(html_string)
# ... or ...
doc = lxml.etree.XML(xml_string)
doc.xpath("//div[@id='hoge']")[0].text
doc.xpath("//div[@id='hoge']")[0].get("class") # attribute
doc.xpath("//ns:entry", namespaces={"ns":"http://example.com/test"}) # namespace
IP:192.168.1.7 TIME:"2011-12-12 (Mon) 14:40:51" REFERER:"http://gimite.net/en/index.php" USER_AGENT:"Mozilla/5.0 (Windows NT 6.1) AppleWebKit/535.7 (KHTML, like Gecko) Chrome/16.0.912.63 Safari/535.7"