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.

This is different from 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.

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

Syntax

 * ImportXFRACASXML( entityID, ImportType XFRACASImportType , byteData , fileTitle , fileDescription )

Parameters:
 * entityID:The ID of the entity to import into.


 * ImportType: The type of XFRACAS Import to utilize, specified as XFRACASImportType.


 * byteData: The byte array of the XML to import.


 * fileTitle: The file title of the XML file byte array to import.


 * fileDescription: A description of the XML to import.

Usage Example
' ' Success= Success = MyRepository.ConnectToSQLRepository("SQLServerPath", "SQLDatabaseName") ' ListOfXFRACASEntities  NameIdPair ListOfXFRACASEntities = MyRepository.XFRACAS.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.XFRACAS.SerializeXMLObjectToByteArray(byteArray, xmlObject) ' ImportXMLSystemID ImportXMLSystemID = MyRepository.XFRACAS.ImportXFRACASXML(DesiredEntityID, XFRACASImportType.Incident, byteArray, "XMLFileTitle", "XMLFileDescription")