icFile | input | character | Full path name of the file in which the XML should be dumped. |
ilHeaderOnly | input | logical | indicates whether only the main table should be used in the generated XML representation. |
ilSuppressEmptyFields | input | logical | When true, blank fields will be removed from the XML Representation. Blank means empty string, or unknown value for all other data types. Zero is not considered an empty value. When false, no fields will be removed. When unknown value, fields with value identical to the default value of that column will be removed. If actual value is the unknown value, and the default value is not unknown value, this unknown value will not be removed. |
iiPriority | input | integer | If Priority is different from 0, an additional tag (Priority) will be supported in the header of the Xml string. |
ilWriteXMLSchema | input | logical | Also include the metaschema in the XML file |
icObjectRowId | input | character | If you want to restrict dumped data to a single object, pass the rowid of the object. Otherwise leave blanc, and all objects in memory will be dumped. |
ilExportForInput | input | logical | When exporting an XML file to be used for direct input, some fields should be suppressed in the output: tContextInfo.tcInvolvedCompanyCodes tContextInfo.tcCorrelationId tContextInfo.tcObjectIdentifier all '*_ID' fields all 'tc_Status' fields (BLF-1908) |
oiReturnStatus | output | integer | Return status of the method. |
if icFile = "" or icFile = ? or icFile = "?" then do: <M-65 run SetMessage (input #T-91'You must enter the file name.':100(6490)T-91# (icMessage), input '' (icArguments), input '' (icFieldName), input '' (icFieldValue), input 'E' (icType), input 3 (iiSeverity), input '' (icRowid), input 'blf-105241':U (icFcMsgNumber), input '' (icFcExplanation), input '' (icFcIdentification), input '' (icFcContext), output viFcReturnSuper (oiReturnStatus)) in database> oiReturnStatus = -3. return. end. create x-document vhDocument in widget-pool "non-persistent". <M-61 run PopulateXDocument (input icObjectRowId (icObjectRowId), input ilHeaderOnly (ilHeaderOnly), input ilSuppressEmptyFields (ilSuppressEmptyFields), input iiPriority (iiPriority), input ilWriteXMLSchema (ilWriteXMLSchema), input ilExportForInput (ilExportForInput), input vhDocument (ihDocument), output viFcReturnSuper (oiReturnStatus)) in database> if viFcReturnSuper <> 0 then oiReturnStatus = viFcReturnSuper. if viFcReturnSuper < 0 then return. assign vlFcOk = vhDocument:save("file", icFile) no-error. if not vlFcOk or error-status:error or error-status:num-messages > 0 then do: assign vcErrors = "". do viCount1 = 1 to error-status:num-messages: if vcErrors <> "" then assign vcErrors = vcErrors + chr(2). assign vcErrors = vcErrors + error-status:get-message(viCount1). end. <M-7 run SetMessage (input trim(#T-2'Unable to save to file $1.':255(5197)T-2#) (icMessage), input icFile (icArguments), input '':U (icFieldName), input '':U (icFieldValue), input 'E':U (icType), input 3 (iiSeverity), input '':U (icRowid), input 'BLF-309':U (icFcMsgNumber), input '':U (icFcExplanation), input '':U (icFcIdentification), input '':U (icFcContext), output viFcReturnSuper (oiReturnStatus)) in database> if vcErrors <> "" then do viCount1 = 1 to num-entries(vcErrors, chr(2)): <M-96 run SetMessage (input entry(viCount1, vcErrors, chr(2)) (icMessage), input '' (icArguments), input '' (icFieldName), input '' (icFieldValue), input 'E' (icType), input 3 (iiSeverity), input '' (icRowid), input 'blf-251139':U (icFcMsgNumber), input '' (icFcExplanation), input '' (icFcIdentification), input '' (icFcContext), output viFcReturnSuper (oiReturnStatus)) in database> end. assign oiReturnStatus = -1. end. finally: if vhDocument <> ? then delete object vhDocument. for each tXMLTables: if tXMLTables.tlStatic then delete object tXMLTables.thBuffer no-error. else delete object tXMLTables.thTableHandle no-error. delete tXMLTables. end. end finally.