Linq To XML Description

Description Article

LINQ to XML is a new way to construct, write and read XML data in the .NET language. This new API simplifies working with XML data without having to resort to using additional language syntax like XPath or XSLT.

Linq to XML Class Diagram


For code samples for XML document load and construction:

For code samples for XML document queries:

For code samples for miscellaneous and transformation operations:


LINQ to XML is not a replacement for any of the current DOM’s or XML class libraries; LINQ to XML in many cases overlaps their functionality and aims to provide a superior developer experience, but existing code will continue to work.

Required .NET Namespaces

The main libraries required for Linq To XML component are:

  • System.Linq
  • System.Xml
  • System.Xml.Linq