Returns a filtered collection of the ancestor elements of this node. Returns a collection of the ancestor elements of this node. Gets or sets the concatenated text contents of this element.Īdds the specified content as children of this XContainer.Īdds the specified content immediately after this node.Īdds an object to the annotation list of this XObject.Īdds the specified content immediately before this node.Īdds the specified content as the first children of this document or element. Gets the previous sibling node of this node. Gets the parent XElement of this XObject. Gets a value indicating whether this element contains no content. Gets a value indicating whether this element has at least one child element. Gets a value indicating whether this element has at least one attribute. Gets the first attribute of this element. Initializes a new instance of the XElement class from an XStreamingElement object. Initializes a new instance of the XElement class with the specified name and content. Initializes a new instance of the XElement class with the specified name. Initializes a new instance of the XElement class from another XElement object. For more information, see LINQ to XML Dynamic Properties. Some XElement methods can be used from XAML. XElement derives from XContainer, which derives from XNode. See XElement Class Overview for other usage information.Īn element has an XName, optionally one or more attributes, and can optionally contain content (for more information, see Nodes).Īn XElement can contain the following types of content:įor details about the valid content of an XElement, see Valid Content of XElement and XDocument Objects. This class represents an XML element, the fundamental XML construct. XElement xmlTree2 = new XElement(aw + "Root", XElement xmlTree1 = new XElement(aw + "Root", For more information, see Work with XML Namespaces. The following is the same example, but in this case the XML is in a namespace. This example produces the following output: The content of the new element comes from a LINQ query. The following example creates an XML tree.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |