before fundamental changes to lxml handling
applied fundamental changes to lxml handling