Problem creating xml file

Discussion in 'ASP.NET / ASP.NET Core' started by braingolfne, May 7, 2009.

  1. Why is the <string> tag generated?
    How can I get rid of it?
    I don't want anything to wrap my xml-code.
    I have tried many different variants ...

    Here is some typical code:
    doc.LoadXml("<?xml version=\"1.0\" encoding=\"utf-8\"?><Projects />");
    doc.Save(Server.MapPath("ourProjects.xml"));

    The resulting xml:
    <?xml version="1.0" encoding="utf-8" ?>
    <string xmlns="http://www.somepath/WebServices">
    <?xml version="1.0" encoding="utf-8"?><Projects />
    </string>
     
  2. I'm not sure if this can be done. I believe the string tag is a .net standard for web services.
     

Share This Page