Create an XML tree in a namespace, with a specified prefix
using System; using System.Linq; using System.Xml.Linq; using System.Collections; using System.Collections.Generic; public class MainClass{ public static void Main(){ XNamespace aw = "http://www.domain.com"; XElement root = new XElement(aw + "Root", new XAttribute(XNamespace.Xmlns + "aw", "http://www.domain.com"), new XElement(aw + "Child", "child content") ); Console.WriteLine(root); } }
1. | Create an XML tree in a namespace. | ||
2. | Create an XML tree with nested namespaces. | ||
3. | Create an XML tree in a namespace | ||
4. | Represents elements in an XML tree that supports deferred streaming output. |