add trim() method to XML (removes #text nodes)