made cb optional for getXmlDom