Get Next XML element

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

version 2003


Get Next XML element (elementRef{; childElemName{; childElemValue}}) String

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

Description

The Get Next XML element command returns a reference to the next "child" of the XML element passed as reference. This reference can be used with other XML parsing commands.

The childElemName and childElemValue parameters, if they are passed, receive respectively the name and the value of the "child" element.

This command is used to parse successively all the "children" of the XML element passed as parameter.

After the last "child", the system variable OK is set to 0.

Examples

(1) Retrieval of the reference of the next XML element following the element passed as parameter:

   C_STRING(16;$xml_Parent_Ref;$next_XML_Ref)
   $next_XML_Ref:=Get Next XML element($xml_Parent_Ref)

(2) Retrieval in a reference loop of XML elements following the parent element passed as parameter:

   C_STRING(16;$xml_Parent_Ref;$first_XML_Ref;$next_XML_Ref)

   $first_XML_Ref:=Get First XML element($xml_Parent_Ref)
   $next_XML_Ref:=$first_XML_Ref
   While(OK=1)
      $next_XML_Ref:=Get Next XML element($next_XML_Ref)
   End while

See also

Get First XML element.

System Variables or Sets

If the command has been correctly executed and if the parsed element is not the last "child" of the referenced element, the system variable OK is set to 1. If an error occurs or if the parsed element is the last "child" of the referenced element, it is set to 0.


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