XML Get Child Element

Kalipso - Form - Actions - Actions Description - Group Communications - XML Get Child Element

Gets the specified child element from a specified XML structure.

Action available for the following operating systems:

Parameters

  • XML <string> - The control, variable or a string that represents a XML file.

  • Child's Name <string> - The name of the child element that user wants to get.

  • Child's Index <numeric> - The index of the child element to get.

  • Ignore Name's Prefix - This parameter defines if the user wants to ignore the name's prefix or not. It can be one of:

    • 1. Yes

    • 2. No

  • Include GrandChildren - Defines if user wants to get the grand-children elements of the selected element to get. It can be one of:

    • 1. Yes

    • 2. No

  • Return Type - The type of the returned element. It can be one of:

    • 1. Full Element

    • 2. Element Content

  • Target - The control or variable to save the child element of an XML.

Usage

Consider the following XML file, saved in variable VAR(XMLResponse):

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <m:AllForwardsResponse xmlns:m="http://footballpool.dataaccess.eu">
      <m:AllForwardsResult>
        <m:string>Aleksandr Kerzhakov</m:string>
        <m:string>Alex Oxlade-Chamberlain</m:string>
        <m:string>Álvaro Negredo</m:string>
        <m:string>André Schürrle</m:string>
        <m:string>Andrei Arshavin</m:string>
        <m:string>Andriy Shevchenko</m:string>
        <m:string>Andriy Voronin</m:string>
        <m:string>Andriy Yarmolenko</m:string>
        <m:string>Andy Carroll</m:string>
        <m:string>Antonio Cassano</m:string>
      </m:AllForwardsResult>
    </m:AllForwardsResponse>
  </soap:Body>
</soap:Envelope>

Example 1

Result:

VAR(Result)

<m:AllForwardsResult>
<m:string>Aleksandr Kerzhakov</m:string>
<m:string>Alex Oxlade-Chamberlain</m:string>
<m:string>Álvaro Negredo</m:string>
<m:string>André Schürrle</m:string>
<m:string>Andrei Arshavin</m:string>
<m:string>Andriy Shevchenko</m:string>
<m:string>Andriy Voronin</m:string>
<m:string>Andriy Yarmolenko</m:string>
<m:string>Andy Carroll</m:string>
<m:string>Antonio Cassano</m:string>
</m:AllForwardsResult>

Example 2

Result:

VAR(Result)

<soap:Body>
<m:AllForwardsResponse xmlns:m="http://footballpool.dataaccess.eu"> 
<m:AllForwardsResult>
<m:string>Aleksandr Kerzhakov</m:string>
<m:string>Alex Oxlade-Chamberlain</m:string>
<m:string>Álvaro Negredo</m:string>
<m:string>André Schürrle</m:string>
<m:string>Andrei Arshavin</m:string>
<m:string>Andriy Shevchenko</m:string>
<m:string>Andriy Voronin</m:string>
<m:string>Andriy Yarmolenko</m:string>
<m:string>Andy Carroll</m:string>
<m:string>Antonio Cassano</m:string>
</m:AllForwardsResult>
</m:AllForwardsResponse>
</soap:Body>

Last updated