Procedure ReadXML(XMLFile, MappingFile, [merge, ]SchemaFile)

ReadXML

The procedure ReadXML you can read an XML data file according to a given user-defined XML format.

ReadXML(
        XMLFile,         ! (input) scalar string expression
        MappingFile,     ! (input) scalar string expression
        merge,           ! (optional) 0 or 1
        SchemaFile       ! (optional) scalar string expression
        )

Arguments

XMLFile

The name of the file from which the XML data must be read

MappingFile

The name of the file containing the mapping between the user-defined XML format and the identifiers in your model.

merge (optional)

With this optional argument (default 0), you can choose whether you want to merge the data included in the XML file with the existing data, or overwrite any existing data (default)

SchemaFile

If you specify the name of a schema file through this argument, AIMMS will validate the contents of the XML data file against this schema prior to reading it into AIMMS.

Return Value

The procedure returns 1 if successful, or 0 otherwise.

Note

The namespace defined in the schema file (if specified) must match the namespace specified in the xmlns attribute of the root element in the XML data file.

See also

The procedures GenerateXML, ReadGeneratedXML, WriteXML. Reading user-defined XML data is discussed in full detail in Reading and Writing User-Defined XML Data of the Language Reference.