XDeclaration Constructor (String, String, String)
Collapse the table of content
Expand the table of content

XDeclaration Constructor (String, String, String)

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Initializes a new instance of the XDeclaration class with the specified version, encoding, and standalone status.

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

'Declaration
Public Sub New ( _
	version As String, _
	encoding As String, _
	standalone As String _
)

Parameters

version
Type: System.String
The version of the XML, usually "1.0".
encoding
Type: System.String
The encoding for the XML document.
standalone
Type: System.String
A string containing "yes" or "no" that specifies whether the XML is standalone or requires external entities to be resolved.

The following example creates a document that contains a declaration.


            Dim doc As XDocument = _
            <?xml version="1.0" encoding="utf-8" standalone="yes"?>
            <!--This is a comment-->
            <Root>content</Root>



Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Show:
© 2017 Microsoft