updated example with correct code to add namespaces to root element.