Porovnávané verzie
porovnané s
Kľúč
- Tento riadok sa pridal
- Riadok je odstránený.
- Formátovanie sa zmenilo.
%XML_AddElementByCopy function
Function
The function adds a an XML element which is a detailed copy of other XML element.
Declaration
Blok kódu | ||||
---|---|---|---|---|
| ||||
INT %XML_AddElementByCopy( INT in node, INT in nodeToCopy ) |
Parameters
node | Handle to parent XML node. |
nodeToCopy | Handle to XML node that detailed copy will be created from. |
Return value
Handle to the XML element added.
Description
The function adds a an XML element to the defined parent XML node. Parent node can be a document or other element. This document represents the detailed copy of existing XML node, i.e. of node containing all its children.
Example
Blok kódu | ||||
---|---|---|---|---|
| ||||
INT _doc1 INT _doc2 INT _listOfElements INT _elementToCopy INT _parentElement INT _copyOfElement INT _freeDoc1 INT _freeDoc2 _doc1 := %XML_ExportD2ObjToDocument(objectName1\HBJ,"") _doc2 := %XML_ExportD2ObjToDocument(objectName2\HBJ,"") _listOfElements := %XML_GetElementsByTagName(_doc1, "HOBJ_REF") _elementToCopy := %XML_Item(_listOfElements,0) _listOfElements := %XML_GetElementsByTagName(_doc2,"REFERENCES") _parentElement := %XML_Item(_listOfElements,0>) |
Blok kódu | ||||
---|---|---|---|---|
| ||||
_copyOfElement := %XML_AddElementByCopy(_parentElement, _elementToCopy) _freeDocl := %XML_FreeDocument(_doc1) _freeDoc2 := %XML_FreeDocument(_doc2) |