Only import etree if we need it