What is difference between XElement and XDocument?

XElement and XDocument are the classes defined with in System.Xml.Linq namespace. XElement class represents an XML fragment. While XDocument class represents an entire XML document with all associated properties.

For Example:


Tagged , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.