PropertyObject.SetXML

Syntax

PropertyObject.SetXML( xmlStream, reserved1, reserved2 = ConflictHandler_Error)

Purpose

Reads the contents of a stream of XML string data and stores the contents in the PropertyObject to which the method applies.

Remarks

You can use the PropertyObject.GetXML method to generate the corresponding XML this method requires.

You cannot unserialize a stream that contains a container type into a property object that is a value type, or vice versa. This method does not return an error. Instead, it sets the PropertyObject on which this method operates to the default value.

If you attempt to unserialize a stream that contains a value type into a property object of a different value type, TestStand attempts to coerce the value. If the coercion is unsuccessful, TestStand only resets the PropertyObject on which this method operates to the default value.

TestStand does not assign the name and some flags associated with the top-level PropertyObject in the stream to the PropertyObject on which this method operates.

Refer to the World Wide Web Consortium-compliant XML schema file, PropertyObject.xsd , located in the <TestStand> \Components\Models\TestStandModels directory, for more information about the output of the PropertyObject.GetXML method and the required format for the input stream to this method.

The <TestStand> \Components\Models\TestStandModels\Report.xsd file defines the XSD schema definition for XML reports.

Parameters

xmlStream As String

[In] Specifies an XML stream.

reserved1 As Long

[In] Pass 0 .

reserved2 As TypeConflictHandlerTypes

[In] This parameter is reserved for when the PropertyObject.GetXML method supports storing type information in an XML stream. This parameter specifies how to handle type conflicts in the stream.

This parameter has a default value of ConflictHandler_Error .

See Also

PropertyObject.GetXML

PropertyObject.Serialize

PropertyObject.UnserializeEx

TypeConflictHandlerTypes

Thread Safety of the PropertyObject API and TestStand Variables