I am creating XML out of Dataset by dataset.GetXML() method. I want to add attributes to it
XmlAttribute attr = xmlObj.CreateAttribute("xmlns:xsi"); attr.Value = "http://www.createattribute.com"; xmlObj.DocumentElement.Attributes.Append(attr); attr = xmlObj.CreateAttribute("xsi:schemaLocation"); attr.Value = "http://www.createattribute.com/schema.xsd"; xmlObj.DocumentElement.Attributes.Append(attr); xmlObj.DocumentElement.Attributes.Append(attr);
But when I open the XML file, I found "xsi:" was not there in the attribute for schemaLocation
<root xmlns="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsi="http://www.createattribute.com" schemaLocation="http://www.createattribute.com/schema.xsd">
I want the attribute like
xsi:schemaLocation="http://www.createattribute.com/schema.xsd"
Is this always like this, or i m missing something here. I am curious if anyone could help me if this could be resolved or give me some URL when I can find the solution for this
Thanks