edmiGetXMLConfigurationBN

edmiGetXMLConfigurationBN

EdmiError edmiGetXMLConfigurationBN(SdaiSchema schemaId, SdaiString xmlConfigurationName, SdaiInstance *xmlConfigurationId, SdaiString *xmlConfigurationString, SdaiString *nameSpace, SdaiString *nameSpaceAlias, SdaiString *xmlSchemaURL);

Reads the XML Configuration data associated by a given XML Configuration Name.

Arguments


Type

Name

Comment

SdaiSchema

schemaId

The schemaID that uniquely identifies the edmSchema for which the XML Configuration was created.

SdaiString

xmlConfigurationName

The name of the XML Configuration.

SdaiInstance

xmlConfigurationId

The instance Id that uniquely identifies the XML Configuration in the EDMdatabase

SdaiString

xmlConfigurationString

An SdaiString pointer that will receive the address of an allocated string buffer containing the XML Configuration data. Use edmiFree to release this memory.

SdaiString

nameSpace

An SdaiString pointer that will receive the address of a string buffer containing the namespace of the elements contained in the UOS element of the generated XML. Use edmiFree to release this memory.

SdaiString

nameSpaceAlias

An SdaiString pointer that will receive the address of an allocated string buffer containing the alias of the <namespace> above. Use edmiFree to release this memory.

SdaiString

xmlSchemaURL

An SdaiString pointer that will receive the address of an allocated string buffer containing the XML Schema URL associated with the <nameSpace> above.

Return Value


Options


 

Example


 

 SdaiInstance schemaId; EdmiError rstat; SdaiModel modId; SdaiModel dictModId; SdaiSchema schemaId; SdaiInstance xmlConfigId; SdaiString xmlConfigString; SdaiString nameSpace; SdaiString nameSpaceAlias; SdaiString xmlSchemaURL; . . . modId = edmiGetModelBN("London", "Block34"); sdaiGetAttrBN(modId, "UNDERLYING_SCHEMA", sdaiINSTANCE, &schemaId); dictModId = sdaiGetInstanceModel(schemaId); if (rstat = edmiGetXMLConfigurationBN(dictModId, "myXmlConfig", &xmlConfigId, &xmlConfigString, &nameSpace, &nameSpaceAlias, &xmlSchemaURL)) { printf("\nError %d in edmiGetXMLConfigurationBN: %s", rstat, edmiGetErrorText(rstat)); goto Error; } /* Print Configuration data */ printf("\nXml Configuration Id: %d", xmlConfigId); printf("\nName Space: %s", nameSpace); printf("\nName Space Alias: %s", nameSpaceAlias); printf("\nSchema URL: %s", xmlSchemaURL); printf("\nConfiguration String: |%s|", xmlConfigString); /* Free allocated memory */ edmiFree(xmlConfigString); edmiFree(nameSpace); edmiFree(nameSpaceAlias); edmiFree(xmlSchemaURL); . . .

 

See also