I try to dynamically create an XML schema (XSD) from C#, using the conventional XElement and XAttribute classes, but it is not valid to specify any names with colons. That is, I cannot create the element <xs:element> using the code
... = new XElement("xs:element");
because ":" is not allowed.
What is the correct way of dynamically building a schema in C# then?