# XML Get Child Element

Gets the specified child element from a specified XML structure.

Action available for the following operating systems:

![](/files/-MAlQBZuuTnc6hyzKSVQ)

### 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

|                           |                     |
| ------------------------- | ------------------- |
| XML                       | VAR(XMLResponse)    |
| **Child's Name**          | "AllForwardsResult" |
| **Child's Index**         | 1                   |
| **Ignore Name's Prefix**  | YES                 |
| **Include Grandchildren** | YES                 |
| **Return Type**           | Full Element        |
| **Target**                | VAR(Result)         |

**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

|                           |                  |
| ------------------------- | ---------------- |
| **XML**                   | VAR(XMLResponse) |
| **Child's Name**          | "Body"           |
| **Child's Index**         | 1                |
| **Ignore Name's Prefix**  | YES              |
| **Include Grandchildren** | YES              |
| **Return Type**           | Full Element     |
| **Target**                | VAR(Result)      |

**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>
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://doc.sysdevmobile.com/kalipso5/developing/form/actions/actions-description/group-communications/xml-get-child-element.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
