GetXML Method

TestStand 2019 Help

Edition Date: May 2019

Part Number: 370052AA-01

»View Product Info
Download Help (Windows Only)

Syntax

PropertyObject.GetXML ( GenerationOptions, InitialIndentation, DefaultName = "", FormatString = "")

Return Value

String

Purpose

Generates the corresponding XML for a PropertyObject.

Remarks

You can use the PropertyObject.SetXML method to recreate an object using the XML this method generates.

You can use the generated XML for exchanging data between TestStand and other applications.

If you call this method on an alias object, TestStand generates the XML stream using the object to which the alias refers. By default, this method includes alias subproperty objects in the XML stream, unless you specify the XMLOptions_ExcludeAliasObjects option.

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 GetXML method and the required format for the input stream to SetXML.

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

Parameters

GenerationOptions As Long

[In] Use this parameter to control the XML generation. You can use any combination of the flags found in XMLOptions.

InitialIndentation As Long

[In] Specifies the number of tab characters in front of each line of generated XML source.

DefaultName As String

[In] Specifies a default name when you call this method on an object that has no name.

Pass an empty string if you want to use the name of the PropertyObject on which this method was called. This applies only to the root PropertyObject and not subproperties.

This parameter has a default value of "".

FormatString As String

[In] Use this parameter to control the format of numeric values in the resulting XML. When you pass an empty string, this method uses the following default TestStand format strings based on the numeric representation of the numeric property objects:

  • %.16g for double-precision, 64-bit floating-point values
  • %d for signed 64-bit integer values
  • %u for unsigned 64-bit integer values

Note  TestStand ignores format strings of the %g type when the representation is signed 64-bit integer or unsigned 64-bit integer.

If you use the XMLOption_UseValueFormatIfDefined flag to format numeric values, the XML instead uses the numeric format of the number, if specified.

This parameter has a default value of "".


See Also

PropertyObject.IsAliasObject

PropertyObject.Serialize

PropertyObject.SetXML

PropertyObject.UnserializeEx

Thread Safety of the PropertyObject API and TestStand Variables

XMLOptions

WAS THIS ARTICLE HELPFUL?

Not Helpful