Database Reference
In-Depth Information
}
Despite the new C# 2008 features and terminology, this will still feel familiar. Once you get the hang
of it, it's an appealing alternative for coding queries. You basically code a query expression instead of
SQL to populate a collection that you can iterate through with a foreach statement. However, you
provide a connection string but don't explicitly open or close a connection. Further, no command, data
reader, or indexer is required. You don't even need the System.Data or System.Data.SqlClient
namespace to access SQL Server.
Pretty cool, isn't it?
Using LINQ to XML
LINQ to XML provides an in-memory XML programming API that integrates XML querying capabilities
into C# 2012 to take advantage of the LINQ framework and add query extensions specific to XML. LINQ
to XML provides the query and transformation power of XQuery and XPath integrated into .NET.
From another perspective, you can also think of LINQ to XML as a full-featured XML API
comparable to a modernized, redesigned SystemXml API plus a few key features from XPath and XSLT.
LINQ to XML provides facilities to edit XML documents and element trees in memory, as well as
streaming facilities. Figure 18-8 shows a sample XML document.
 
Search WWH ::




Custom Search