Linq to xml windows ce
Without runtime LINQ would be rather useless. You can use them separately but they are way more powerful together. The content you requested has been removed. Ask a question. Quick access. Search related threads.
Remove From My Forums. Answered by:. Archived Forums. NET Compact Framework. NET Compact Framework 3. Feedback will be sent to Microsoft: By pressing the submit button, your feedback will be used to improve Microsoft products and services. Privacy policy. This information can help you decide which technologies to use. XmlReader is a fast, forward-only, non-caching parser. However, you can also use XmlReader directly.
For example, suppose you're building a Web service that will parse hundreds of XML documents per second, and the documents have the same structure, meaning that you only have to write one implementation of the code to parse the XML.
In this case, you'd probably want to use XmlReader directly. In contrast, if you're building a system that parses many smaller XML documents, and each one is different, you'd want to take advantage of the productivity improvements that LINQ to XML provides. XSLT is a rule-based, declarative approach. Transformations can be written using pure functions that are implemented without side effects. This rule-based or functional approach is unfamiliar to many developers, and can be difficult and time-consuming to learn.
XSLT can be a productive system that yields high-performance applications. In certain scenarios, it is important to be able to compare two XML trees for equivalence. For example, if you are writing a web service that serves results of queries, and you want to cache query results so that duplicate queries use previously cached results instead of always accessing the underlying database.
However, the senders of those queries may potentially be using a variety of tools to generate the queries, and these tools may introduce trivial differences into the XML. This post demonstrates the thought process of developing a somewhat more involved query. I believe that it is easier to maintain code that is written in the functional style.
For one thing, this is the very reason for many of the characteristics of functional code. If a variable is in scope, then the variable has its value, and it will never have another value. If you are writing a server-side application that caches queries expressed in XML, then you may want to store these queries in a hash table. In those posts, as I evolved the query, I showed each iteration of it, highlighting the changes I made.
This post continues modifying that query. This post presents an approach for significant performance gains. When thought of in a certain way, XML documents come in two flavors — data-centric and document-centric.
Further, there are two types of document-centric documents. This post presents my thoughts about approaches to various types of document-centric transformations — data-centric to document-centric, document-centric to data-centric, and document-centric to document-centric.
Writing pure functional transformations a in a recursive style enables us to put together interesting transformations in a very small amount of code.
0コメント