Contents
Display Legacy Contents

 Print
    XML Get Child Element    
Gets the specified child element from a specified XML structure.
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.


     
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
  Example 2
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> 

 

 
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>


See also
Samples

 
 
Updated : 12/21/2017 4:41 PM