XmlElement child = doc.CreateElement(element);
Where doc is an object of XmlDocument. When the code executes the above line with element=Tom and Jerry, I get the following error:
The ' ' character, hexadecimal value 0x20, cannot be included in a name.
What should I do to include ' ' in XmlDocument? I can not replace it with anything else.
What are the other characters which XML element does not support for name ?