.XML IMPORT
This subroutine processes an XML file and optionally imports it.
Usage:
PASS <key> FIELD SHARE? Y
PASS <XML_file> FIELD SHARE? N
PASS <XML_Map> FIELD SHARE? N
PASS <Import_Flag> FIELD SHARE? N
SUBR 0DX .XML IMPORT DETACHED END? N FAIL 0
* Check for errors
IF 0DX .XML IMPORT NE
Description:
This subroutine processes an XML file and optionally imports it. The first 2 parameters are required. If any required parameters are missing, the subroutine will CANCEL.
<key> is the numeric key that will be assigned to this import (Required). This must be PASSed with Share "Y" to return the value.
<XML_file> is the XML file to be processed and optionally imported (Required). This must be a file accessible to the Appx session on the server.
<XML_Map> is the mapping to use (Optional). If PASSed, must refer to a previously defined mapping. If you want the API to import your data, the mapping must include a subroutine name and the subroutine must exist. If you are planning to process the extracted identifiers and data yourself, you do not need to pass a map name.
<Import_Flag> A Y/N flag to indicate if the data import subroutine specified on the mapping should be run (Optional). If you pass Y, you must pass a valid Map Name in the previous parameter.
After the API is complete, your extracted data will be available in the 0DX XVALUE file. This is true, regardless of whether the API imported the data or not. The XVALUE file is keyed on the <key> that is returned from the API. Remember that there can be more than one imported file in XVALUE, you should use <key> in a BEG AT/END AT to only read the data records for this import.
XVALUE is a temporary file and the contents will be lost when the session ends.
Comments:
Read what other users have said about this page or add your own comments.
--
JeanNeron - 2013-10-02