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

AF SDK Reference

PISystem.ImportXml Method (Object, PIImportMode, String)

PISystem.ImportXml Method (Object, PIImportMode, String)

  • Last UpdatedNov 18, 2025
  • 2 minute read
PISystem.ImportXml Method (Object, PIImportMode, String)
Imports the XML representation of any object from either a file or string.

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

Syntax

public int ImportXml(
	Object importObject,
	PIImportMode importMode,
	string xml
)
Public Function ImportXml ( 
	importObject As Object,
	importMode As PIImportMode,
	xml As String
) As Integer

Dim instance As PISystem
Dim importObject As Object
Dim importMode As PIImportMode
Dim xml As String
Dim returnValue As Integer

returnValue = instance.ImportXml(importObject, 
	importMode, xml)
public:
int ImportXml(
	Object^ importObject, 
	PIImportMode importMode, 
	String^ xml
)
member ImportXml : 
        importObject : Object * 
        importMode : PIImportMode * 
        xml : string -> int 

Parameters

importObject
Type: SystemObject
The object to import the XML data into. If , the PISystem object will be used.
importMode
Type: OSIsoft.AFPIImportMode
One or more of the PIImportMode values which indicates how to import.
xml
Type: SystemString
The XML data to import. If the string is in the form of a file name or url, it will attempt to load the XML from the file.

Return Value

Type: Int32
Returns the number of items updated or created.

Remarks

The XML representation of the objects are imported into the specified import object.

Version Information

AFSDK


See Also

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