DOM Get last child XML element
DOM Get last child XML element ( elementRef {; childElemName {; childElemValue}} ) : Text
Parameter | Type | Description | |
---|---|---|---|
elementRef | Text | → | XML element reference |
childElemName | Text | ← | Name of child element |
childElemValue | Text | ← | Value of child element |
Function result | Text | ← | XML element reference |
Description
The DOM Get last child XML element command returns an XML reference to the last “child” of the XML element passed as reference in elementRef. This reference may be used with the other XML parsing commands.
The optional childElemName and childElemValue parameters, when passed, receive respectively the name and value of the “child” element.
Example
Recovery of the reference of the last XML element of the parent root. The XML structure (C:\\import.xml) is loaded into a BLOB beforehand:
var myBlobVar : Blob
var $ref_XML_Parent;$ref_XML_Child : Text
var $childName;$childValue : Text
DOCUMENT TO BLOB("c:\\import.xml";myBlobVar)
$ref_XML_Parent:=DOM Parse XML variable(myBlobVar)
$ref_XML_Child:=DOM Get last child XML element($ref_XML_Parent;$childName;$childValue)
System variables and sets
If the command has been executed correctly, the system variable OK is set to 1. Otherwise, it is set to 0.
See also
DOM Get first child XML element
Properties
Command number | 925 |
Thread safe | ✓ |
Modifies variables | OK |