c# - XElement is automatically adding xmlns="" to itself -
i creating new xdocument table. have validate document xsd document , keeps failing because add xmlns="" 1 of elements when shouldn't. here's parts of code pertinent. xnamespace xsi = "http://www.w3.org/2001/xmlschema-instance"; xnamespace xmlns = "https://uidataexchange.org/schemas"; xelement employertpaseparationresponse = null; xelement employertpaseparationresponsecollection = new xelement(xmlns + "employertpaseparationresponsecollection", new xattribute(xnamespace.xmlns + "xsi", xsi), new xattribute(xsi + "schemalocation", "https://uidataexchange.org/schemas separationresponse.xsd")); xdocument doc = new xdocument( new xdeclaration("1.0", null, "yes"), employertpaseparationresponsecollection); //sample xelement populate element database staterequestrecordguid = new xelement("stater...