optimize imports
remove param 'encoding' from _element_tostring_factory