%XML_ImportD2ObjFromDocument function


Function
The function imports an object, represented by an XML document, to configuration.
Declaration
BOOL %XML_ImportD2ObjFromDocument(
  INT in document,
  TEXT in importSettings
  INT in expSubDirMode
 )
Parameters
documentHandle to the XML document.
importSettingsXML Import settings (optional parameter) in form [setting={on/off} [setting={on/off} [...]]].
expSubDirModeMode (optional parameter) that defines setting the attribute "Export subdirectory" of object after finished import.
Return value
@TRUE - the function was done successfully
@FALSE - the function failed
Description
The function imports the object, represented by an XML document, to configuration. It can not be applied on the object which has been gotten by the %XML_OpenDocument function, if the object (xml file) contains the binary data (bin files).

Constance for the parameter expSubDirMode:

Numerical valueConstantDescription
0@SDM_KEEP_VALUEKeep value of attribute as it was originally set in the configuration of object.
1@SDM_DEL_VALUEDelete value of attribute in the configuration of object.
3@SDM_SET_SOURCESet value of attribute as it is defined in the imported XML data.
Example
 BOOL _ok
 INT _doc
 
 _ok := %XML_ImportD2ObjFromDocument(_doc) 
 
 
 
 BOOL _ok
 INT _doc
 
 _ok := %XML_ImportD2ObjFromDocument(_doc,  "uid_strict=off uid_usexml=on")
Note
Error description can be called by means of ESL function %XML_GetLastErrorMessage.
Error code can be called by means of ESL function %XML_GetLastErrorCode. The code "-11" means that XML Import failed because other one had been already running.
Napíšte komentár