For a C# 2010 desktop application, I have a user that wants me to work with a directory path name that looks like C:\C-Received.
I am going to place the C:\C-Received in the application configuration file which is in an xml format.
I am wondering if the dash (-) that is part of the C-Received needs to have any special characters around it since the value will be contained in an xml file?
If so, what special characters do I need to place around the '-' dash?
Also can you point me to the reference that shows which characters in an xml file need special characters around them to be recognized?
Loading
Suthish NairPosted Mar 26, 2013, 11:46 AM
Try using – for "-"
VulpesPosted Mar 26, 2013, 11:45 AM
Although there are limitations on what tags can include, you can include most other characters within an XML file.
However, there are a few characters (< ,> , & , ' and ") which should be replaced by predefined entities as they would otherwise cause problems to an XML parser.
Check this link for a full account of what characters can be included in an XML file and which ones require special treatment:
http://en.wikipedia.org/wiki/XML