Made the dom implementation more compapatible with CXML dom.