Repository.XFRACAS.ImportXFRACASXML

Synthesis API allows the programmer to import XML files into XFRACAS. The page contains the logic of that importation. All XML files must first be in the XFRACAS format before they can be successfully imported. To view XFRACAS formats refer to the XFRACAS XML Import Documentation business logic contents.

This is different than the importing XML files directly into XFRACAS. If the programmer wishes to import files directly into XFRACAS instead of using Synthesis API, they should view the XFRACAS XML Import Documentation for the steps of that importation.

ImportXFRACASXML uploads an import byte array for processing and returns the system ID.

Parameters
entityID

ImportType

byteData

fileTitle

fileDescription

Usage Example
' ' Success= Success = MyRepository.ConnectToSQLRepository("SQLServerPath", "SQLDatabaseName") ' ListOfXFRACASEntities  NameIdPair ListOfXFRACASEntities = MyRepository.GetAllXFRACASEntities ' DesiredEntityID For Each Entity NameIdPair In ListOfXFRACASEntities If Entity.Name = "DesiredEntityName" DesiredEntityID = Entity.ID              Exit For End If       Next ' xmlObject  = ' ' byteArray Byte = ' SerializeSuccess SerializeSuccess = MyRepository.SerializeXMLObjectToByteArray(byteArray, xmlObject) ' ImportXMLSystemID ImportXMLSystemID = MyRepository.ImportXFRACASXML(DesiredEntityID, XFRACASImportType.Incident, byteArray, "XMLFileTitle", "XMLFileDescription")

Reformatted Usage Example
Private WithEvents MyRepository As New Repository

Dim Success As Boolean = False Success = MyRepository.ConnectToSQLRepository("SQLServerPath", "SQLDatabaseName")

Dim ListOfXFRACASEntities As NameIdPair ListOfXFRACASEntities = MyRepository.GetAllXFRACASEntities

Dim DesiredEntityID As Integer For Each Entity As NameIdPair In ListOfXFRACASEntities If Entity.Name = "DesiredEntityName" DesiredEntityID = Entity.ID              Exit For End If       Next

Dim xmlObject As Object = Nothing 'populate the xmlObject with values to import

Dim byteArray As Byte = Nothing

Dim SerializeSuccess As Boolean SerializeSuccess = MyRepository.SerializeXMLObjectToByteArray(byteArray, xmlObject)

Dim ImportXMLSystemID As Integer ImportXMLSystemID = MyRepository.ImportXFRACASXML(DesiredEntityID, XFRACASImportType.Incident, byteArray, "XMLFileTitle", "XMLFileDescription")