Convert more to lxml instead of libxml2 directly