Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (209.89 KB, 12 trang )
© Copyright SELA Software & Education Labs Ltd. 14-18 Baruch Hirsch St. Bnei Brak 51202 Israel
LINQ via C# 3.0
Chapter 5 – LINQ to XML
© Copyright SELA Software & Education Labs Ltd. 14-18 Baruch Hirsch St. Bnei Brak 51202 Israel
LINQ to XML
•
Introducing a light-weight XML object
model: XElement
•
Generating XML fragments with the
XElement API
•
Querying XElement DOMs
© Copyright SELA Software & Education Labs Ltd. 14-18 Baruch Hirsch St. Bnei Brak 51202 Israel
Primary LINQ to XML Types
•
LINQ to XML is implemented in
System.Xml.Linq.dll
•
Primary classes:
–
XElement – can contain a document or a fragment
–
XDocument – full-fledged XML document (with
declaration, processing instructions etc.)
–
XAttribute – represents an XML attribute
•
In-memory XmlReader-based model
© Copyright SELA Software & Education Labs Ltd. 14-18 Baruch Hirsch St. Bnei Brak 51202 Israel
Constructing XML