Share via


XContainer.CreateWriter Method

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Creates an XmlWriter that can be used to add nodes to the XContainer.

Namespace:  System.Xml.Linq
Assembly:  System.Xml.Linq (in System.Xml.Linq.dll)

Syntax

'Declaration
Public Function CreateWriter As XmlWriter
public XmlWriter CreateWriter()

Return Value

Type: System.Xml.XmlWriter
An XmlWriter that is ready to have content written to it.

Remarks

While serializing, namespace prefixes are inferred from the namespace attributes in the XML tree.

For more information, see Working with Namespacese in the .NET Framework documentation.

Version Information

Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

XNA Framework

Supported in: Xbox 360, Windows Phone OS 7.0

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.