PISystem.ExportXml Method (Object, PIExportMode)
- Last UpdatedNov 18, 2025
- 2 minute read
- PI System
- AF SDK 2024 R2
- Developer
Exports the XML representation of any object(s) and returns it as a string.
Namespace: OSIsoft.AF
Assembly: OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 3.1.1.1182
Syntax
public string ExportXml( Object exportObject, PIExportMode exportMode )
Public Function ExportXml ( exportObject As Object, exportMode As PIExportMode ) As String Dim instance As PISystem Dim exportObject As Object Dim exportMode As PIExportMode Dim returnValue As String returnValue = instance.ExportXml(exportObject, exportMode)
public: String^ ExportXml( Object^ exportObject, PIExportMode exportMode )
member ExportXml : exportObject : Object * exportMode : PIExportMode -> string
Parameters
- exportObject
- Type: SystemObject
The object to return in XML format. If , the PISystem will be used. - exportMode
- Type: OSIsoft.AFPIExportMode
One or more of the PIExportMode values which indicates the amount of data to export.
Return Value
Type: StringReturns the XML representation of the exported objects.
Remarks
The XML representation of the objects is generated and returned in string format.
This method can be expensive in terms of memory for large exports since the entire XML
string representation must be held in memory. Consider using one of the other overloads.