Tracy.Bai

Focus on Data analysis and Mining

导航

linq in action学习笔记第9章

1.Linq to xml design principles

why microsoft choose to create Linq to xml?

already exists xml APIs: xmlReader ,xmlTextReader,xmlNode.

LINQ to XML aims to solve these problems by providing mainstream developers
with a simple, yet powerful, XML programming API. It provides the query and
transformation power of XQuery and XPath integrated into .NET programming
languages, as well as an in-memory programming API that makes working with
XML data consistent and predictable.Additionally, LINQ itself brings many language advancements
such as extension methods, anonymous types, and lambda expressions. In
order for LINQ to fulfill its goal of providing a single query API for all data,
Microsoft needed to ensure the LINQ story surrounding XML was compelling.

2.Linq to xml Class hierarchy

2.1 let me look a example to compare the DOM and the linq to xml

linq to xml key conception:funtion contruction

它能够让我们很方便的new a xmlElement ,而不必像DOM那样先create,然后再append;

linq to xml key conception:context-free xml creation

linq to xml 不再局限于document或者parent element的上下文。

3.Loading,parsing and manipulating xml

posted on 2008-10-06 21:52  Love Fendi  阅读(152)  评论(0编辑  收藏  举报