Aracılığıyla paylaş


System.Xml.Linq Namespace

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Contains the classes for LINQ to XML. LINQ to XML is an in-memory XML programming interface that enables you to modify XML documents efficiently and easily.

Using LINQ to XML, you can:

  • Load XML from files or streams.

  • Serialize XML to files or streams.

  • Create XML trees from scratch by using functional construction.

  • Query XML trees by using LINQ queries.

  • Manipulate in-memory XML trees.

Classes

  Class Description
Public class Extensions Contains the LINQ to XML extension methods.
Public class XAttribute Represents an XML attribute.
Public class XCData Represents a text node that contains CDATA.
Public class XComment Represents an XML comment.
Public class XContainer Represents a node that can contain other nodes.
Public class XDeclaration Represents an XML declaration.
Public class XDocument Represents an XML document.
Public class XDocumentType Represents an XML Document Type Definition (DTD).
Public class XElement Represents an XML element.
Public class XName Represents a name of an XML element or attribute.
Public class XNamespace Represents an XML namespace. This class cannot be inherited.
Public class XNode Represents the abstract concept of a node (one of: element, comment, document type, processing instruction, or text node) in the XML tree.
Public class XNodeDocumentOrderComparer Contains functionality to compare nodes for their document order. This class cannot be inherited.
Public class XNodeEqualityComparer Compares nodes to determine whether they are equal. This class cannot be inherited.
Public class XObject Represents a node or an attribute in an XML tree.
Public class XObjectChangeEventArgs Provides data for the Changing and Changed events.
Public class XProcessingInstruction Represents an XML processing instruction.
Public class XStreamingElement Represents elements in an XML tree that supports deferred streaming output.
Public class XText Represents a text node.

Enumerations

  Enumeration Description
Public enumeration LoadOptions Specifies load options when parsing XML.
Public enumeration ReaderOptions Specifies whether to omit duplicate namespaces when loading an XDocument with an XmlReader.
Public enumeration SaveOptions Specifies serialization options.
Public enumeration XObjectChange Specifies the event type when an event is raised for an XObject.

See Also

Reference

Other Resources