Use the iselement() check that LXML itself uses, buried deep in a random example in its 'documentation'. SO DUMB