Declare doctype when parsing fragment
May 2, 2011
2:39 p.m.
Hello list, I'm using lxml to parse and rebuild some XHTML/HTML pages. I have a problem that the parser strips out all html entities if I do not specify a doctype. I know now that I can use the load_dtd when parsing a full document but how do I do that with the fragment parser? How can I specify a DTD when using lxml.html.fragment_fromstring()? Cheers, Henrik
5609
Age (days ago)
5609
Last active (days ago)
0 comments
1 participants
participants (1)
-
Henrik Zagerholm