How to remove xml “&” symbol

flash

New Member
i am parasing xml file to dataset.I getting error if xml data contain "&" or some special char how to remove that?How to remove "&" from below tag? xml\[code\] < department departmentid=1 name="pen & Note" >\[/code\]$\[code\] string departmentpath = HostingEnvironment.MapPath("~/App_Data/Department.xml"); DataSet departmentDS = new DataSet(); System.IO.FileStream dpReadXml = new System.IO.FileStream(departmentpath, System.IO.FileMode.Open); try { departmentDS.ReadXml(dpReadXml); } catch (Exception ex) { //logg }\[/code\]
 
Back
Top