SEARCH
0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Prev | Current Page 290 | Next

Scott Klein

"Professional LINQ"


XElement xmlTree = new XElement("Sales",
from el in StreamSalesOrders(@"C:\Wrox\LINQ\Chapter 8\Orders.xml")
where (DateTime)el.Attribute("Date") >= startDate
&& (DateTime)el.Attribute("Date") <= endDate
175
Part II: LINQ to XML
select new XElement("Order",
new XElement("SalesPerson",
(string)el.Parent.Element("Name")),
new XElement(el.Element("Amount")),
new XElement("OrderDate", el.Attribute("Date"))
)
);
Your results should now look like the following:


Scott
9.00



Steve
999.00



In essence, by using the XmlWriter class and ReadFrom method, you are basically building your own axis
method. It enables you to work with large XML documents without sacrificing performance.
Streaming Large XML Documents
Now you??™re ready to use the streaming technique to work with large XML documents. Take a look at the
following code. The XML fragment is now constructed utilizing an IEnumerable element.


Pages:
278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302
hotel jelenia góra Russian bride Free English grammar and study guid powiekszenia wielkoformatowe counter strike 1.6