The attributes "xmlns: wnio" and "xmlns: xf" are attributes like any other. Just add them to the XmlElement so you want these XML namespaces to be available.
The following snippet gives almost what you want:
XmlDocument document = new XmlDocument();
document.AppendChild(document.CreateElement("wnio", "element", "somuri"));
document.DocumentElement.SetAttribute("xmlns:xf", "abcd");
document.DocumentElement.AppendChild(document.CreateElement("xf", "nestedelement", "abcd"));
source
share