You must Sign In to post a response.
  • Category: XML

    How to replace invalid characters in xml

    how to replace invalid characters in xml file

    like below i have post some samle code can any one tell me ........

    ("<", "<");
    (">", ">");
    ("\"", """);
    ("\'", "'");
    ("&", "&");
    if my xml child node have < symbol in that place replaced by "<" as usual remaing ....
  • #740748
    instead of replace character with double quotes use Unicode in xml so that it can display properly
    see below code snippet

    String sz = sz.Replace("<","<");
    String sz = sz.Replace(">",">");
    String sz = sz.Replace("&","&");
    String sz = sz.Replace("/","/");

    hope it helps

    Editor, DotNetSpider MVM
    Microsoft MVP 2014 [ASP.NET/IIS]

  • Sign In to post your comments