XNamespace ns = "urn:iso:std:iso:20022:tech:xsd:pain.001.001.03";
var doc = new XElement(ns + "Document",
new XAttribute(XNamespace.Xmlns + "xsi",
"http://www.w3.org/2001/XMLSchema-instance"));
Result:
<Document xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="urn:iso:std:iso:20022:tech:xsd:pain.001.001.03" />