3.2.4.5.22 SetXml (Opnum 30)

The SetXml method sets the properties of the data collector by using the values in the supplied XML string.

 HRESULT SetXml(
   [in] BSTR Xml,
   [out, retval] IValueMap** Validation
 );

Xml:  Supplies a BSTR that MUST contain an XML description of the data collector. Each data collector can defined as a set of XML elements; the set of required elements are described in the section of each data collector type: PerformanceDataCollector (section 3.2.4.6), ConfigurationDataCollector (section 3.2.4.7), AlertDataCollector (section 3.2.4.8), TraceDataCollector (section 3.2.4.9) and ApiTracingDataCollector (section 3.2.4.10). The XML elements are also specified in section 3.2.4.19, which contains the set of XML elements required to define all data collector types within a data collector set.

Validation: Receives a validation value map with a list of properties for this data collector set (and its encapsulated objects) that are invalid or ignored. For each property of the data collector set and its associated objects, passed in by the client, that could not be set, the server MUST return in an IValueMap. Each IValueMapItem in the IValueMap represents a property of the data collector set and its encapsulated objects that could not be set by the server. The Names property of the IValueMapItem represents the property name, while the Values property of the IValueMap represents the HRESULT describing the specific property corresponding to that property. The ValueMapType property of the IValueMap is plaValidation; more information can be found in section 2.2.11. Note that the client MAY choose to ignore any warnings or errors that are returned by the server; however, if it does so, the data collector set might not be executed by the server as the client expects.

Return Values: This method MUST return an HRESULT with the severity bit clear on success as specified in [MS-ERREF]; otherwise, it MUST return one of the errors as defined in 2.2.1 or one of the errors as defined in [MS-ERREF] section 2.1.