XmlElement child = doc.CreateElement(element);
Where doc is an object of XmlDocument. When the code executes the above line wi
doc
XmlDocument
It seems your XML element name contains spaces...
This is illegal:
hi
Must be this: