using System.Xml.Serialization;
public static void Main()
NoNamespaceSchemaLocation = "myXML.xsd"
var xsn = new XmlSerializerNamespaces();
xsn.Add( "NS0", "http://www.w3.org/2001/XMLSchema-instance" );
var settings = new XmlWriterSettings
OmitXmlDeclaration = true,
using var writer = XmlWriter.Create(Console.Out, settings);
new XmlSerializer(typeof(File)).Serialize(writer, file, xsn);
[XmlAttribute("noNamespaceSchemaLocation", Namespace = "http://www.w3.org/2001/XMLSchema-instance")]
public string NoNamespaceSchemaLocation { get; set; }