Repository.XFRACAS.SerializeXMLObjectToByteArray: Difference between revisions

From ReliaWiki
Jump to navigation Jump to search
mNo edit summary
No edit summary
Line 2: Line 2:




<onlyinclude>Serializes an XML file for import into XFRACAS. Returns a '''Boolean''' value; when true, indicates a successful import.</onlyinclude>
<onlyinclude>Serializes an XML file for import into XFRACAS. Returns a '''Boolean''' value; when true, indicates a successful serialization.</onlyinclude>


== Syntax ==
== Syntax ==
  '''XFRACAS.SerializeXMLObjectToByteArray( pData() {{APIPrefix|As Byte}}, pObject {{APIPrefix|As Object}}) {{APIPrefix|As Integer}}'''
  '''.XFRACAS.SerializeXMLObjectToByteArray'''(''pData()'', ''pObject'')


===Parameters===
===Parameters===
Line 11: Line 11:
''pData''
''pData''


:Required. Byte.  
:Required. Byte. A defined byte array.


''pObject''
''pObject''

Revision as of 18:20, 27 October 2015

APIWiki.png


Member of: SynthesisAPI10.Repository


Serializes an XML file for import into XFRACAS. Returns a Boolean value; when true, indicates a successful serialization.

Syntax

.XFRACAS.SerializeXMLObjectToByteArray(pData(), pObject)

Parameters

pData

Required. Byte. A defined byte array.

pObject

Required. A serializable XML object.

Example

VB.NET

 'Add code to connect to the Synthesis repository. 
  Dim MyRepository As New Repository
  ... 

 'Define a serializable XML object and populate with values to import. 
  Dim xmlObject As Object = Nothing
  ... 
  
 'Define the byte array and then serialize the object to the byte array. 
  Dim byteArray As Byte() = Nothing
  Dim SerializeSuccess As Boolean
  SerializeSuccess = MyRepository.XFRACAS.SerializeXMLObjectToByteArray(byteArray, xmlObject)

 'Import the XML byte array into XFRACAS entity ID# 10. 
  Dim ImportXMLSystemID As Integer
  ImportXMLSystemID = MyRepository.XFRACAS.ImportXFRACASXML(10, XFRACASImportType.Incident, byteArray, "XMLFileTitle", "XMLFileDescription")

 'Process the imported file. 
  MyRepository.XFRACAS.ProcessXfracasImports()