Quantcast
Channel: XML, System.Xml, MSXML and XmlLite forum
Viewing all articles
Browse latest Browse all 935

XElement Save Adds Leading Charachters

$
0
0

Dear Experts,

XElement objEl = XElement.Load(Filename);
            objEl = objEl.Element("ACES");
            XNamespace xsi = XNamespace.Get(@"http://www.w3.org/2001/XMLSchema-instance");
            XNamespace aces = XNamespace.Get(@"ACES_DLR.xsd");
            objEl.SetAttributeValue(XNamespace.Xmlns + "xsi", xsi);
            objEl.Add(new XAttribute(xsi + "noNamespaceSchemaLocation", aces));
            objEl.Save(Filename);
after the file is saved the saved file have these 3 characters ∩╗┐ , ascii vales[239,187,191]  how to suppress this 3 charachteres while write and   can you explain why they get added and what is there purpose


Viewing all articles
Browse latest Browse all 935

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>