This documentation is archived and is not being maintained.

System.Xml.Linq Namespace

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 using functional construction.

  • Query XML trees using LINQ queries.

  • Manipulate in-memory XML trees.

  • Validate XML trees using XSD.

  • Use a combination of these features to transform XML trees from one shape into another.

Public classExtensionsContains the LINQ to XML extension methods.
Public classXAttributeRepresents an XML attribute.
Public classXCDataRepresents a text node that contains CDATA.
Public classXCommentRepresents an XML comment.
Public classXContainerRepresents a node that can contain other nodes.
Public classXDeclarationRepresents an XML declaration.
Public classXDocumentRepresents an XML document.
Public classXDocumentTypeRepresents an XML Document Type Definition (DTD).
Public classXElementRepresents an XML element.
Public classXNameRepresents a name of an XML element or attribute.
Public classXNamespaceRepresents an XML namespace. This class cannot be inherited.
Public classXNodeRepresents the abstract concept of a node (element, comment, document type, processing instruction, or text node) in the XML tree.
Public classXNodeDocumentOrderComparerContains functionality to compare nodes for their document order. This class cannot be inherited.
Public classXNodeEqualityComparerCompares nodes to determine whether they are equal. This class cannot be inherited.
Public classXObjectRepresents a node or an attribute in an XML tree.
Public classXObjectChangeEventArgsProvides data for the Changing and Changed events.
Public classXProcessingInstructionRepresents an XML processing instruction.
Public classXStreamingElementRepresents elements in an XML tree that supports deferred streaming output.
Public classXTextRepresents a text node.

Public enumerationLoadOptionsSpecifies load options when parsing XML.
Public enumerationReaderOptionsSpecifies whether to omit duplicate namespaces when loading an XDocument with an XmlReader.
Public enumerationSaveOptionsSpecifies serialization options.
Public enumerationXObjectChangeSpecifies the event type when an event is raised for an XObject.


Other Resources