Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »


Returns all XML Configurations for a given Express schema in the EDMdatabase.
Related functions: edmiCreateXMLConfiguration, edmiDeleteXMLConfiguration, edmiDeleteXMLConfigurationBN, edmiGetXMLConfiguration, edmiGetXMLConfigurationBN, edmiGetXMLConfigurationId
Header:
#include "sdai.h"
Prototype:
EdmiError edmiListXMLConfigurations(SdaiSchema    schemaId,
                                     SdaiInstance  **xmlConfigurationIds,
                                     SdaiString    **xmlConfigurationNames,
                                     SdaiInteger   *numberOfConfigsReturned);
Arguments:

SchemaId

The schemaID that uniquely identifies the Express schema in an EDMdatabase for which XML Configurations shall be listed.

**xmlConfigurationIds

The address of an SdaiInstance pointer that will receive the the address of an allocated buffer containing numberOfConfigsReturned XML Configuration Ids.
Use edmiFree to release the allocated memory.

**xmlConfigurationNames

The address of an SdaiString pointer that will receive the the address of an allocated buffer containing numberOfConfigsReturned allocated XML Configuration Names.
Use edmiFree to release each of the allocated allocated XML Configuration Names as well as the SdaiString pointer buffer it self.

*numberOfConfigsReturned

The number of XML Configurations listed for the Express Schema.

Returns:
A completion code of datatype EdmiError is the returned function value. The completion code has the following values:
Completion code = 0 : Operation successfully performed.
Completion code != 0: Error in operation. Completion code is an EDMinterface error code. Use edmiGetErrorText to get the error text corresponding to the error code.
EXAMPLE
EdmiError rstat;
SdaiInteger i;
SdaiSchema schemaId;
SdaiModel modId;
SdaiInstance *pXmlConfigIds;
SdaiString *pXmlConfigNames;
SdaiInteger nXmlConfigs;
. . .
rstat = edmiGetSchema("City", &schemaId);
modId = edmiGetModelBN("London", "Block34");
if (rstat = edmiListXMLConfigurations(schemaId, &pXmlConfigIds,
&pXmlConfigNames, &nXmlConfigs )) { 
printf("\nError %d in edmiListXMLConfigurations: %s", rstat,
edmiGetErrorText(rstat)); 
goto Error; 
}
/* Print XML Configurations */
for (i=0; i<nXmlConfigs; i++) {
printf("\nXml Configuration Id - name: %d : %s",
*(pXmlConfigIds+i), *(pXmlConfigNames+i));
edmiFree(pXmlConfigNames+i); 
}
edmiFree(pXmlConfigIds);
edmiFree(pXmlConfigNames);
. . .

  • No labels