Repository.XFRACAS.ImportXFRACASXMLString: Difference between revisions
Jump to navigation
Jump to search
Alex Ulanov (talk | contribs) No edit summary |
Kate Racaza (talk | contribs) No edit summary |
||
Line 1: | Line 1: | ||
{{Template: | {{Template:API}}{{Template:APIBreadcrumb|10|.[[Repository Class|Repository]]}} | ||
Uploads an import file | |||
<onlyinclude>Uploads an import file byte stream for processing. Returns an '''Integer''' that represents the system ID.</onlyinclude> | |||
== Syntax == | == Syntax == | ||
'''.XFRACAS.ImportXFRACASXMLString'''(''entityID'', ''importType'', ''xmlString'', ''fileTitle'', ''fileDescription'') | |||
===Parameters=== | |||
''entityID'' | |||
:Integer. The ID number of the XFRACAS entity to import the data into. (Required) | |||
''importType'' | |||
:The type of XFRACAS element (e.g., incident, problem, etc.) to import. Can be any [[XFRACASImportType Enumeration|XFRACASImportType]] constant. (Required) | |||
''xmlString'' | |||
:String. The string consisting of the XML to import. | |||
''fileTitle'' | |||
: | :String. The file title of the XML file byte array to import. | ||
''fileDescription'' | |||
: | : String. A description of the XML data to import. (Required) | ||
== | == Example == | ||
This example assumes that the repository is connected to an XFRACAS with existing entities. | |||
'''VB.NET''' | |||
{{APIComment|'Add code to connect to a Synthesis repository.}} | |||
{{APIPrefix|Dim}} MyRepository {{APIPrefix|As New}} Repository | |||
{{APIComment|...}} | |||
{{APIComment|'Define an XML string and populate it with the XML text.}} | |||
{{APIPrefix|Dim}} xmlString {{APIPrefix|As String}} = {{APIPrefix|Nothing}} | |||
{{APIComment|...}} | |||
{{APIComment|'Import the XML byte array into the first available XFRACAS entity.}} | |||
{{APIComment|'The following code assumes that the XML string type describes XFRACAS incidents.}} | |||
{{APIPrefix|Dim}}ImportXMLSystemID{{APIPrefix|As Integer}} | |||
ImportXMLSystemID = MyRepository.XFRACAS.ImportXFRACASXMLString(1, XFRACASImportType.Incident, xmlString, {{APIString|"XMLFileTitle"}}, {{APIString|"XMLFileDescription"}}) |
Revision as of 23:53, 19 August 2015
Member of: SynthesisAPI10.Repository
Uploads an import file byte stream for processing. Returns an Integer that represents the system ID.
Syntax
.XFRACAS.ImportXFRACASXMLString(entityID, importType, xmlString, fileTitle, fileDescription)
Parameters
entityID
- Integer. The ID number of the XFRACAS entity to import the data into. (Required)
importType
- The type of XFRACAS element (e.g., incident, problem, etc.) to import. Can be any XFRACASImportType constant. (Required)
xmlString
- String. The string consisting of the XML to import.
fileTitle
- String. The file title of the XML file byte array to import.
fileDescription
- String. A description of the XML data to import. (Required)
Example
This example assumes that the repository is connected to an XFRACAS with existing entities.
VB.NET 'Add code to connect to a Synthesis repository. Dim MyRepository As New Repository ... 'Define an XML string and populate it with the XML text. Dim xmlString As String = Nothing ... 'Import the XML byte array into the first available XFRACAS entity. 'The following code assumes that the XML string type describes XFRACAS incidents. DimImportXMLSystemIDAs Integer ImportXMLSystemID = MyRepository.XFRACAS.ImportXFRACASXMLString(1, XFRACASImportType.Incident, xmlString, "XMLFileTitle", "XMLFileDescription")