Assembly: System.Xml.Linq (in System.Xml.Linq.dll)
You can use this method to write a method that returns a collection of nodes, yielding each node as the node is read from the reader. This method enables you to process arbitrarily large XML files with a very small memory footprint.
The reader that you pass to this method might throw exceptions. does not catch all exceptions thrown by the reader; the unhandled exceptions bubble up to the code that called . In particular, your code should be prepared to handle XmlException.
For an example of how to stream a more complex document, see How to: Stream XML Fragments with Access to Header Information in the .NET Framework documentation.
Certain standard query operators, such as OrderBy, iterate their source, collect all of the data, sort it, and then finally yield the first item in the sequence. If you use a query operator that materializes its source before yielding the first item, you will not retain a small memory footprint.
For an example of using LINQ to XML to transform extremely large XML documents while maintaining a small memory footprint, see How to: Perform Streaming Transform of Large XML Documents in the .NET Framework documentation.
For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.