How to represent space and tab in XML tag. Is there any special characters for them to represent.
Illegal XML Tag Name Characters can be encoded using Unicode UCS-2. This works very nicely. I am using it to create XML that gets turned into json (JPath is weak compared to XPath). Notice the handling of spaces, (, ) characters. Unicode UCS-2 Code Chart: http://www.columbia.edu/kermit/ucs2.html
tag.Name = tag.Name.Replace(" ", "_x0020_");
tag.Name = tag.Name.Replace("(", "_x0028_");
tag.Name = tag.Name.Replace(")", "_x0029_");
XML:
{CHARGEBACKCODE}
{CHARGEBACKCODE}
zzz@yyy.gov
transformed to json via json.net:
"Internal Chargeback ID": "{CHARGEBACKCODE}",
"Bill To": "{CHARGEBACKCODE}",
"Operator or Directly Responsible Individual (DRI)": "xxx@yyy.gov",