DOM Get last child XML element

4D - Documentation   Français   English   German   4th Dimension 2004, Command Theme List   4th Dimension 2004, Command Alphabetical List   4th Dimension 2004, Constant Theme List   Back   Previous   Next

version 2004.2


DOM Get last child XML element (elementRef{; childElemName{; childElemValue}}) String

ParameterTypeDescription
elementRefStringXML element reference
childElemNameStringName of child element
childElemValueStringValue of child element
Function resultStringXML element reference (16 characters)

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:

   C_BLOB(myBlobVar)
   C_STRING(16;$ref_XML_Parent;$ref_XML_Child)
   C_TEXT($childName;$childValue)

   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)

See Also

DOM Get first child XML element.

System Variables or Sets

If the command has been executed correctly, the system variable OK is set to 1. Otherwise, it is set to 0.


4D - Documentation   Français   English   German   4th Dimension 2004, Command Theme List   4th Dimension 2004, Command Alphabetical List   4th Dimension 2004, Constant Theme List   Back   Previous   Next