Move code to documentUtil
Work around XHTML tag name case sensitivity. #63