i am creating xml using linq.xml through xelement. my hirerachy is some thing like this
I want this schema 2 str
here is my code for schema generation
XNamespace Namespace = XNamespace.Get("urn:APISchema.xsd");
root = new XElement(namepsace + "Foo");
root.Add(new XElement("version", "2"));
root.Add(new XElement("foochild", "str"));
but the resultant schema is
<Foo xlmns="urn:APISchema.xsd">
<version xlmns="">2</version>
<foochild xlmns="">str</foochild>
</Foo>
any idea why such problem why it is appending xlmn to root childs...?