Tuesday, October 7, 2008

LINQ to XML Notes

Some notes on LINQ to XML

  • All LINQ to XML objects inherit from XObject.
  • All LINQ to XML objects except XAttribute inherit from XNode which directly inherits from XObject.
  • Using XDocument is optional. (XDocument wraps an XElement object and adds to it.)
  • Both XDocument and XElement have static methods Load and Parse to load XML.
  • Load() can build an X-DOM from a TextReader, XmlReader, a file or a URI (such as a web service or RSS feed).
  • Parse can build an X-DOM from a fragment of XML in a string.

No comments:

Post a Comment