我正在学习XML查询和Xdocuments,但在更新现有元素的属性时遇到了问题。这是我的WCF服务。第二部分有效(创建具有属性的新元素。问题是我的查询不能返回任何结果并且代码总是添加一个新元素。//thiswillinserttheofficerlocationandstatusintothexmldatafile//Ireadabouthowtodothisathttp://prathapk.net/creating-wcf-service-to-store-read-data-in-xml-database///andhttps://msdn.microsoft.com/en-us