System.Xml.Linq Spazio dei nomi
Contiene le classi per LINQ to XML. Contains the classes for LINQ to XML. LINQ to XML è un'interfaccia di programmazione XML in memoria che consente di modificare documenti XML in modo efficace e facile. LINQ to XML is an in-memory XML programming interface that enables you to modify XML documents efficiently and easily.
Classi
Extensions |
Contiene i metodi di estensione LINQ to XML.Contains the LINQ to XML extension methods. |
XAttribute |
Rappresenta un attributo XML.Represents an XML attribute. |
XCData |
Rappresenta un nodo di testo che contiene CDATA.Represents a text node that contains CDATA. |
XComment |
Rappresenta un commento XML.Represents an XML comment. |
XContainer |
Rappresenta un nodo che può contenere altri nodi.Represents a node that can contain other nodes. |
XDeclaration |
Rappresenta una dichiarazione XML.Represents an XML declaration. |
XDocument |
Rappresenta un documento XML.Represents an XML document. Per informazioni sui componenti e l'uso di un oggetto XDocument, vedere Panoramica della classe XDocument.For the components and usage of an XDocument object, see XDocument Class Overview. |
XDocumentType |
Rappresenta una definizione DTD (Document Type Definition) XML.Represents an XML Document Type Definition (DTD). |
XElement |
Rappresenta un elemento XML.Represents an XML element. Per informazioni sull'uso e per esempi, vedere Panoramica della classe XElement e la sezione Osservazioni in questa pagina.See XElement Class Overview and the Remarks section on this page for usage information and examples. |
XName |
Rappresenta un nome di un elemento o attributo XML.Represents a name of an XML element or attribute. |
XNamespace |
Rappresenta uno spazio dei nomi XML.Represents an XML namespace. La classe non può essere ereditata.This class cannot be inherited. |
XNode |
Rappresenta il concetto astratto di un nodo (elemento, commento, tipo di documento, istruzione di elaborazione o nodo di testo) nell'albero XML.Represents the abstract concept of a node (element, comment, document type, processing instruction, or text node) in the XML tree. |
XNodeDocumentOrderComparer |
Contiene funzionalità per confrontare nodi e rilevare l'ordine del documento.Contains functionality to compare nodes for their document order. La classe non può essere ereditata.This class cannot be inherited. |
XNodeEqualityComparer |
Confronta due nodi per determinarne l'uguaglianza.Compares nodes to determine whether they are equal. La classe non può essere ereditata.This class cannot be inherited. |
XObject |
Rappresenta un nodo o un attributo in un albero XML.Represents a node or an attribute in an XML tree. |
XObjectChangeEventArgs |
Fornisce i dati per gli eventi Changing e Changed.Provides data for the Changing and Changed events. |
XProcessingInstruction |
Rappresenta un'istruzione di elaborazione XML.Represents an XML processing instruction. |
XStreamingElement |
Rappresenta gli elementi in un albero XML che supporta l'output del flusso posticipato.Represents elements in an XML tree that supports deferred streaming output. |
XText |
Rappresenta un nodo di testo.Represents a text node. |
Enumerazioni
LoadOptions |
Specifica le opzioni di caricamento durante l'analisi di XML.Specifies load options when parsing XML. |
ReaderOptions |
Specifica se omettere spazi dei nomi duplicati durante il caricamento di un oggetto XDocument con un oggetto XmlReader.Specifies whether to omit duplicate namespaces when loading an XDocument with an XmlReader. |
SaveOptions |
Specifica le opzioni di serializzazione.Specifies serialization options. |
XObjectChange |
Specifica il tipo di evento quando viene generato un evento per un oggetto XObject.Specifies the event type when an event is raised for an XObject. |
Commenti
Con LINQ to XML è possibile:Using LINQ to XML, you can:
Caricare codice XML da file o flussi.Load XML from files or streams.
Serializzare codice XML in file o flussi.Serialize XML to files or streams.
Creare alberi XML da zero usando la costruzione funzionale.Create XML trees from scratch using functional construction.
Eseguire query su strutture ad albero XML utilizzando query LINQ.Query XML trees using LINQ queries.
Modificare gli alberi XML in memoria.Manipulate in-memory XML trees.
Convalidare alberi XML usando lo schema XSD.Validate XML trees using XSD.
Usare una combinazione di queste funzionalità per trasformare strutture ad albero XML da una forma in un altra.Use a combination of these features to transform XML trees from one shape into another.