I try execute such a code sample.
var xmlDocument = new XmlDocument();
documentTagName = "testName)"
XmlNode headerElement = xmlDocument.CreateElement(documentTagName);
Of cource I get XmlException:
The ')' character, hexadecimal value 0x... (doesn't matter), cannot be included in a name
Because I have )
symbol in documentTagName
. And of cource I'll get the same exception if documentTagName
would be like this:
documentTagName = "testName("
or like this:
documentTagName = "testName:"
Because all of these characters ('('
, ')'
, ':'
) are invalid for the xml tag name. But I check many links (and even this) and cannot find the list of all invalid characters for xml tag name. Can anybody help me?