How do I add a simple namespace?

Unladaral

New Member
How do I make this line in my xml? (the problem is the namespace)The closes I came was this:\[code\]XDocument doc = new XDocument();XElement root = new XElement("root", new XAttribute("name", Name), new XAttribute(XNamespace.Xmlns, Namespace)//<-- XNamespace.Xmlns is not good);\[/code\]I have tryed with new XAttribute("xmlns", Namespace) also, but I just don't get it.
 
Back
Top