Export (0) Print
Expand All

Process XML Data Using LINQ to XML

LINQ to XML is the new model in the .NET Framework version 3.5 for processing XML data. LINQ to XML allows developers to do everything they would expect with XML data: querying, modifying, creating, saving, and serializing XML documents. The real advantages lie in the query and creation capabilities.

Queries in LINQ to XML are succinct and expressive, using syntax more similar to SQL than to XPath or XQuery. Because query results can be returned as collections of elements or attributes and can be used as parameters for XElement objects, XML trees can be easily transformed from one shape to another.

LINQ to XML leverages the language-integrated query (LINQ) technology in the .NET Framework version 3.5. LINQ extends the language syntax of C# and Visual Basic to provide powerful query capabilities that can be extended to potentially any data store.

See LINQ to XML [from BPUEDev11] for a detailed discussion of its use, and see LINQ (Language-Integrated Query) for an overview of the LINQ framework.

Show:
© 2014 Microsoft