A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://www.mail-archive.com/html5lib-discuss@googlegroups.com/msg00621.html below:

Issue 213 in html5lib: element.sourceline is None

Status: New
Owner: ----

New issue 213 by mtjahan...@gmail.com: element.sourceline is None
http://code.google.com/p/html5lib/issues/detail?id=213
When using lxml tree builder, source line of elements is not populated.

div_html = "<div>"

parser =  html5lib.HTMLParser(tree=html5lib.getTreeBuilder("lxml"))
root = html5lib.parse(div_html)
div = list(root.iter())[-1] # <div> element
print(div.sourceline) # -> None

div = lxml.html.from_string(div_html)
print(div.sourceline) # -> 1


--
You received this message because you are subscribed to the Google Groups 
"html5lib-discuss" group.
To post to this group, send an email to html5lib-discuss@googlegroups.com.
To unsubscribe from this group, send email to 
html5lib-discuss+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/html5lib-discuss?hl=en-GB.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4