Manoj,
Simply include a field in the class that writes out the attribute:
public class Root
{
[XmlAttribute( Namespace=""http://www.w3.org/2001/XMLSchema-instance")]
public string noNamespaceSchemaLocation="Dummy.xsd";
// all your other fields ...
}
--
HTH
Christoph Schittko [MVP]
Software Architect, .NET Mentor
"Manoj Shirahatti" <ma**************@in.bosch.com> wrote in message
news:bj**********@ns2.fe.internet.bosch.com...
Hello all,
How do i add the schema reference in the XML file generated by XMl
Serialization.
My generated XMl file should have the following attribute in the Root
Element.
<Root Element xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="Dummy.xsd">
I want the xsi:noNamespaceSchemaLocation the following to be present in
the XML file.
TIA
Manoj