我正在尝试一次性处理大型XML文档(使用XmlReader),并使用XmlSerializer仅反序列化其中的某些元素。下面是一些代码和一个小型模拟XML文档,展示了我是如何尝试这样做的。RationaleforusingXmlReader:1.IamdealingwithverylargeXMLdocuments(10–250MB),whichforthisreasonIdonotwanttoloadintomemory.SoXmlDocumentisoutofthequestion.2.Iwanttoextractonlycertainelements.TypicallyIwill