add DOMUtil.to_text and tests