h***@public.gmane.org
2012-09-13 09:39:09 UTC
Status: New
Owner: ----
New issue 213 by mtjahan...-***@public.gmane.org: 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
Owner: ----
New issue 213 by mtjahan...-***@public.gmane.org: 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-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
To unsubscribe from this group, send email to html5lib-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit this group at http://groups.google.com/group/html5lib-discuss?hl=en-GB.
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-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
To unsubscribe from this group, send email to html5lib-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit this group at http://groups.google.com/group/html5lib-discuss?hl=en-GB.