One of the worst pitfalls a design team can fall into is trying to do too much. The principle is captured by the well known quote:
Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away. - Antoine de Saint-Exupery
So, what has been taken away from LINQ to XML (aka XLinq) in the pursuit of simplicity (if not perfection)? I'm in the process of documenting the "non-goals" for XLinq, and thought it would be good to share them and get some feedback.
I discussed the non-goal of replacing XSLT as a tool for processing unstructured documents and replacing XQuery as a database query language in a previous post. Some other non-goals include:
If these non-goals of XLinq don't meet your requirements, Microsoft offers alternatives that can be used separately or in conjunction with XLinq. For example, DOM has an object model that supports entities and entity references. The XmlReader and XmlWriter APIs are available to work with XML text in its raw form. In the Orcas release of LINQ to XML, there are plans to add "bridge" classes to allow XLinq to work in better harmony with the rest of System.Xml, e.g. to invoke XSLT over an XLinq tree to work around the non-goal of creating non well-formed output.
I'll update this post as other non-goals are identified. We would, as usual, very much like to hear from prospective XLinq users as to whether these non-goals will clash with your goals or not. It's possible we have taken away things that shouldn't have been taken away ... or maybe there are still things we can remove in in the pursuit of API perfection
[Updated 7/1 with the XML 1.1 point and an elaboration on the extensibility point]