SectionInformation.GetRawXml Method (System.Configuration)

Switch View :
ScriptFree
.NET Framework Class Library
SectionInformation.GetRawXml Method

This API supports the .NET Framework infrastructure and is not intended to be used directly from your code.

Returns an XML node object that represents the associated configuration-section object.

Namespace:  System.Configuration
Assembly:  System.Configuration (in System.Configuration.dll)
Syntax

Visual Basic
Public Function GetRawXml As String
C#
public string GetRawXml()
Visual C++
public:
String^ GetRawXml()
F#
member GetRawXml : unit -> string 

Return Value

Type: System.String
The XML representation for this configuration section.
Exceptions

Exception Condition
InvalidOperationException

This configuration object is locked and cannot be edited.

Examples

The following example shows how to use the GetRawXml method.

Visual Basic

Public Shared Sub GetSectionXml()

    Dim sInfo As SectionInformation = _
    GetSectionInformation()

    Dim sectionXml As String = sInfo.GetRawXml()

    Console.WriteLine("Section xml:")
    Console.WriteLine(sectionXml)

End Sub 'GetSectionXml
 


C#

static public void GetSectionXml()
{
    SectionInformation sInfo =
        GetSectionInformation();

    string sectionXml =
        sInfo.GetRawXml();

    Console.WriteLine("Section xml:");
    Console.WriteLine(sectionXml);

}


Version Information

.NET Framework

Supported in: 4, 3.5, 3.0, 2.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
Platforms

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
See Also

Reference