<PackageReference Include="System.Xml.XDocument" Version="4.0.11-beta-23409" />

System.Xml.Linq.XStreamingElement

public class XStreamingElement
Represents elements in an XML tree that supports deferred streaming output.
public XName Name { get; set; }

Gets or sets the name of this streaming element.

public XStreamingElement(XName name)

Initializes a new instance of the XElement class from the specified XName.

public XStreamingElement(XName name, object content)

Initializes a new instance of the XStreamingElement class with the specified name and content.

public XStreamingElement(XName name, object[] content)

Initializes a new instance of the XStreamingElement class with the specified name and content.

public void Add(object content)

Adds the specified content as children to this XStreamingElement.

public void Add(object[] content)

Adds the specified content as children to this XStreamingElement.

public void Save(Stream stream)

Outputs this XStreamingElement to the specified Stream.

public void Save(Stream stream, SaveOptions options)

Outputs this XStreamingElement to the specified Stream, optionally specifying formatting behavior.

public void Save(TextWriter textWriter)

Serialize this streaming element to a TextWriter.

public void Save(TextWriter textWriter, SaveOptions options)

Serialize this streaming element to a TextWriter, optionally disabling formatting.

public void Save(XmlWriter writer)

Serialize this streaming element to an XmlWriter.

public string ToString(SaveOptions options)

Returns the XML for this streaming element, optionally disabling formatting.

public void WriteTo(XmlWriter writer)

Writes this streaming element to an XmlWriter.