Read an entire device profile and return it as an XML encoded string

Namespace: ASCOM.Utilities
Assembly: ASCOM.Utilities (in ASCOM.Utilities.dll) Version: 6.0.0.0 (6.1.1.2619)

Syntax

C#
public string GetProfileXML(
	string DriverId
)
Visual Basic
Public Function GetProfileXML ( _
	DriverId As String _
) As String
Visual C++
public:
virtual String^ GetProfileXML(
	String^ DriverId
) sealed

Parameters

DriverId
Type: System..::..String
The ProgID of the device

Return Value

Device profile encoded in XML

Implements

IProfile..::..GetProfileXML(String)

Remarks

Please see the code examples in this help file for a description of how to use this method.

The format of the returned XML is shown below. The SubKey element repeats for as many subkeys as are present while the Value element with its Name and Data memebers repeats as often as there are values in a particular subkey.

 <?xml version="1.0" encoding="utf-8" ?> 
 <ASCOMProfileAL>
 <SubKey>
 <SubKeyName /> 
 <DefaultValue>Default text value</DefaultValue> 
    <Values>
      <Value>
        <Name>Valuename 1</Name> 
        <Data>False</Data> 
      </Value>
      <Value>
        <Name>Valuename 2</Name> 
        <Data>True</Data> 
      </Value>
    </Values>
  </SubKey>
  <SubKey>
    <SubKeyName>Settings</SubKeyName> 
    <DefaultValue /> 
    <Values>
      <Value>
        <Name>Valuename 3</Name> 
        <Data>1</Data> 
      </Value>
      <Value>
        <Name>Valuename 4</Name> 
        <Data>53.4217</Data> 
      </Value>
    </Values>
  </SubKey>
 </ASCOMProfileAL>
 

See Also