Unable to extract a certain element in xml in Robot framework

Help please,
I have this xml:
<?xml version="1.0" encoding="UTF-8"?>

<report landingPageWidgetType="SECTION_CONTROLLER"
        width="3"
        title="Marketing"
        showTimespanFilter="true"
        backgroundColor="#0F8287">
</report>
<report reportQueryType="GENERAL_COUNTS"
        landingPageWidgetType="COUNTER_REPORT"
        generalCountsCounters="TOTAL_USERS,ACTIVE_USERS,NEW_USERS,SESSIONS"
        timeType="LAST_MONTH"
        width="3"
        title="Users"
        reportType="STATIC"
        chartType="COUNTERS">
    <Parameters>
        <Conditions>
            <Condition type="USERS_REPORTED">true</Condition>
        </Conditions>
    </Parameters>
</report>

<report reportQueryType="GENERAL_COUNTS"
        landingPageWidgetType="COUNTER_REPORT"
        generalCountsCounters="TOTAL_ENDPOINTS,ACTIVE_ENDPOINTS,NEW_ENDPOINTS,SESSIONS"
        timeType="LAST_MONTH"
        width="3"
        title="Endpoints"
        reportType="STATIC"
        chartType="COUNTERS">
    <Parameters>
        <Conditions>
            <Condition type="USERS_REPORTED">false</Condition>
            <Condition type="SINGLE_ENDPOINT">false</Condition>
        </Conditions>
    </Parameters>
</report>
<report reportQueryType="GEOGRAPHIC_USERS"
        landingPageWidgetType="STANDARD_REPORT"
        timeType="LAST_12_MONTHS"
        width="2"
        title="Usage Map: Users"
        reportType="MAP"
        xAxisTitle="Country"
        yAxisTitle="# of Users">
    <Parameters>
        <Conditions>
            <Condition type="USERS_REPORTED">true</Condition>
            <Condition type="CUSTOMERS_REPORTED">true</Condition>
        </Conditions>
    </Parameters>
</report>

<report reportQueryType="GEOGRAPHIC_USERS"
        landingPageWidgetType="STANDARD_REPORT"
        timeType="LAST_12_MONTHS"
        width="3"
        title="Usage Map: Users"
        reportType="MAP"
        xAxisTitle="Country"
        yAxisTitle="# of Users">
    <Parameters>
        <Conditions>
            <Condition type="USERS_REPORTED">true</Condition>
            <Condition type="CUSTOMERS_REPORTED">false</Condition>
        </Conditions>
    </Parameters>
</report>

<report reportQueryType="GEOGRAPHIC_ENDPOINT"
        landingPageWidgetType="STANDARD_REPORT"
        timeType="LAST_12_MONTHS"
        width="2"
        title="Usage Map: Endpoints"
        reportType="MAP"
        xAxisTitle="Country"
        yAxisTitle="# of endpoints">
    <Parameters>
        <Conditions>
            <Condition type="CUSTOMERS_REPORTED">true</Condition>
            <Condition type="USERS_REPORTED">false</Condition>
            <Condition type="SINGLE_ENDPOINT">false</Condition>
        </Conditions>
    </Parameters>
</report>

<report reportQueryType="GEOGRAPHIC_ENDPOINT"
        landingPageWidgetType="STANDARD_REPORT"
        timeType="LAST_12_MONTHS"
        width="3"
        title="Usage Map: Endpoints"
        reportType="MAP"
        xAxisTitle="Country"
        yAxisTitle="# of endpoints">
    <Parameters>
        <Conditions>
            <Condition type="CUSTOMERS_REPORTED">false</Condition>
            <Condition type="USERS_REPORTED">false</Condition>
            <Condition type="SINGLE_ENDPOINT">false</Condition>
        </Conditions>
    </Parameters>
</report>

<report reportQueryType="GENERAL_COUNTS"
        landingPageWidgetType="COUNTER_REPORT"
        generalCountsCounters="TOTAL_CUSTOMERS,ACTIVE_CUSTOMERS,NEW_CUSTOMERS"
        timeType="LAST_MONTH"
        width="0"
        title="Customers"
        reportType="STATIC"
        chartType="COUNTERS">
    <Parameters>
        <Conditions>
            <Condition type="CUSTOMERS_REPORTED">true</Condition>
        </Conditions>
    </Parameters>
</report>

I want to loop on all the conditions for each report, I tried the following:

${xml_obj}= Parse XML ${xmlFile}
${report_count}= XML.Get Child Elements ${xml_obj} .//report
@{report_children}= Create List
FOR ${reportIndex} IN RANGE 1 ${report_count}
${xpath_presence_check}= BuiltIn.Run Keyword ANd Return Status Element Should Exist .//report[${reportIndex}]/Parameters/Conditions/Condition
Run Keyword IF ‘${xpath_presence_check}’==‘TRUE’ XML.Get Element Text ${xml_obj} .//report[${reportIndex}]/Parameters/Conditions/Condition
Append To List ${report_children}

Log TO COnsole ${report_children}
END

But it returns that it doesnot exist. Kindly point me to the problem here please?

THanks

What exactly is the error message? “it returns that it does not exist” is rather vague, the error message on your console should be more precise than that.

One thing I notice is that you use @{report_children}= Create List but the @ can just be $. I doubt that’s the problem, but you can try.