htm.fromstring rogue parents

Nov. 3, 2016
4:37 p.m.
Hello, Perhaps that's a very basic question, but I couldn't find the answer. lxml.html.fromstring adds implicit parents to the parsed element.
How do I prevent this? ie I want .getparent() to return None and .getroottree().getroot() to return the top-level element. Best, Burak -- Python : sys.version_info(major=2, minor=7, micro=12, releaselevel='final', serial=0) lxml.etree : (3, 6, 4, 0) libxml used : (2, 9, 4) libxml compiled : (2, 9, 4) libxslt used : (1, 1, 29) libxslt compiled : (1, 1, 29)
3034
Age (days ago)
3034
Last active (days ago)
0 comments
1 participants
participants (1)
-
Burak Arslan