The function imports an object, represented by XML document,
to configuration.
Declaration
BOOL %XML_ImportD2ObjFromDocument(
INT in document,
TEXT in importSettings
INT in expSubDirMode
)
Parameters
document
Handle to XML document.
importSettings
XML Import
settings
(optional parameter) in form [setting={on/off} [setting={on/off}
[...]]].
expSubDirMode
Mode (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 XML document,
to configuration. It can not be applied on the object which has been gotten
by function %XML_OpenDocument, if
the object (xml file) contains the binary data (bin files).
Constance for the parameter expSubDirMode:
Numerical value
Constant
Description
0
@SDM_KEEP_VALUE
Keep value of attribute as it was originally set in the configuration of
object.
1
@SDM_DEL_VALUE
Delete value of attribute in the configuration of object.
3
@SDM_SET_SOURCE
Set 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.
0 komentárov