2 May 2011 16:39
Declare doctype when parsing fragment
Henrik Zagerholm <henke <at> mac.se>
2011-05-02 14:39:56 GMT
2011-05-02 14:39:56 GMT
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
RSS Feed