LINQ to XML annotations (LINQ to XML)
Annotations in LINQ to XML enable you to associate any arbitrary object of any arbitrary type with any XML component in an XML tree.
To add an annotation to an XML component, such as an XElement or XAttribute, you call the AddAnnotation method. You retrieve annotations by type.
Note that annotations aren't part of the XML infoset; they're not serialized or deserialized.
Methods
You can use the following methods when working with annotations:
Method | Description |
---|---|
AddAnnotation | Adds an object to the annotation list of an XObject. |
Annotation | Gets the first annotation object of the specified type from an XObject. |
Annotations | Gets a collection of annotations of the specified type for an XObject. |
RemoveAnnotations | Removes the annotations of the specified type from an XObject. |
Sarađujte sa nama na GitHub-u
Izvor za ovaj sadržaj možete da pronađete u usluzi GitHub, gde možete i da kreirate i pregledate probleme i povučete zahteve. Više informacija potražite u našem vodiču za saradnike.