Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AF SDK Reference

PISystem.ExportXml Method (Object, PIExportMode, XmlWriter, Object, Object, EventHandler(AFProgressEventArgs))

PISystem.ExportXml Method (Object, PIExportMode, XmlWriter, Object, Object, EventHandler(AFProgressEventArgs))

  • Last UpdatedNov 18, 2025
  • 4 minute read
PISystem.ExportXml Method (Object, PIExportMode, XmlWriter, Object, Object, EventHandler(AFProgressEventArgs))
Exports the XML representation of any object(s) to an XmlWriter.

Namespace:  OSIsoft.AF
Assembly:  OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 3.1.1.1182

Syntax

public void ExportXml(
	Object exportObject,
	PIExportMode exportMode,
	XmlWriter writer,
	Object startTime,
	Object endTime,
	EventHandler<AFProgressEventArgs> eventHandler
)
Public Sub ExportXml ( 
	exportObject As Object,
	exportMode As PIExportMode,
	writer As XmlWriter,
	startTime As Object,
	endTime As Object,
	eventHandler As EventHandler(Of AFProgressEventArgs)
)

Dim instance As PISystem
Dim exportObject As Object
Dim exportMode As PIExportMode
Dim writer As XmlWriter
Dim startTime As Object
Dim endTime As Object
Dim eventHandler As EventHandler(Of AFProgressEventArgs)

instance.ExportXml(exportObject, exportMode, 
	writer, startTime, endTime, eventHandler)
public:
void ExportXml(
	Object^ exportObject, 
	PIExportMode exportMode, 
	XmlWriter^ writer, 
	Object^ startTime, 
	Object^ endTime, 
	EventHandler<AFProgressEventArgs^>^ eventHandler
)
member ExportXml : 
        exportObject : Object * 
        exportMode : PIExportMode * 
        writer : XmlWriter * 
        startTime : Object * 
        endTime : Object * 
        eventHandler : EventHandler<AFProgressEventArgs> -> unit 

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.
writer
Type: System.XmlXmlWriter
The XmlWriter to use to generate the XML. On completion, the XmlWriter will be closed.
startTime
Type: SystemObject
An object representing the earliest starting time for AFEventFrame, AFTransfer, and AFCase objects that may be part of the exported object. Use if no event frame type objects are to be included. The value may be an AFTime, DateTime, PITime, String, or numeric. A DateTime (or a DATE will be treated as UTC time if its Kind property is set to Unspecified. Because DATE values from COM or VB6 clients are marshalled as Unspecified, these client applications must convert to UTC prior to marshalling. An integer numeric represents the number of ticks (100-nanosecond intervals) since January 1, 0001. A floating point numeric represents the number of seconds since January 1, 1970 UTC. A String is interpreted as local time, unless it contains a time zone indicator such as a trailing "Z" or "GMT". Strings will be interpreted with the AFTime.Parse Overload methods so that relative formats with intervals ("*", "T+3h", etc.) are also supported. Relative time intervals are based on the object's QueryDate.
endTime
Type: SystemObject
An object representing the latest ending time for AFEventFrame, AFTransfer, and AFCase objects that may be part of the exported object. The value may be an AFTime, DateTime, PITime, String, or numeric. A DateTime (or a DATE will be treated as UTC time if its Kind property is set to Unspecified. Because DATE values from COM or VB6 clients are marshalled as Unspecified, these client applications must convert to UTC prior to marshalling. An integer numeric represents the number of ticks (100-nanosecond intervals) since January 1, 0001. A floating point numeric represents the number of seconds since January 1, 1970 UTC. A String is interpreted as local time, unless it contains a time zone indicator such as a trailing "Z" or "GMT". Strings will be interpreted with the AFTime.Parse Overload methods so that relative formats with intervals ("*", "T+3h", etc.) are also supported. Relative time intervals are based on the object's QueryDate.
eventHandler
Type: SystemEventHandlerAFProgressEventArgs
Delegate used to receive progress indication on operations.

Remarks

The XML representation of the objects is generated and output to an XmlWriter.

Version Information

AFSDK


See Also

In This Topic
Related Links
TitleResults for “How to create a CRG?”Also Available in