Hard coded namespace for attribute
using System;
using System.IO;
using System.Xml;
using System.Xml.Linq;
using System.Collections;
using System.Collections.Generic;
public class MainClass{
public static void Main(){
XElement e = new XElement("{http://www.domain.com}Root",
new XAttribute("{http://www.domain.com}Att", "content")
);
Console.WriteLine(e);
}
}
Related examples in the same category