docElem = xmlDocument.appendChild(root); docElem2 = docElem.appendChild(root2); node = docElem2.createTextNode(date2str(today(), 123,2,2,2,2,2));