我想用C#写一个xml文件。这是一个像这样的基本文件:如果没有Employee节点,我不想有Employees节点...我想使用XElement但我不能因为那个...所以我使用了XmlWriter。它工作正常,但我发现编写XML非常冗长:EmployeeConfigurationconfig=EmployeeConfiguration.GetConfiguration();using(XmlWriterwriter=XmlWriter.Create(_fileUri,settings)){writer.WriteStartDocument();//writer.WriteStartEl