Liquid Mapping Issue when Input XML Contains Nested Nodes with the Same Name

Liquid Mapping Issue when Input XML Contains Nested Nodes with the Same Name

XML Input:

<EVE>
  <EVE>
    <EVE.CAMS>
      <EVE_CODE>20250806001</EVE_CODE>
      <EVE_TITL>WPK -EVE TITLE EVI TEST</EVE_TITL>
      <EVI>
        <EVI.CAMS>
          <EVI_SEQN>20250806101</EVI_SEQN>
          <EVENT_TITLE>WPK -EVE TITLE EVI TEST</EVENT_TITLE>
          <EVA>
            <EVA.CAMS>
              <EVA_CODE>WPK-01</EVA_CODE>
              <EVA_EVEC>20250806201</EVA_EVEC>
              <EVA_EVIS>20250806901</EVA_EVIS>
              <EVA_SEQN>1</EVA_SEQN>
            </EVA.CAMS>
          </EVA>
        </EVI.CAMS>
      </EVI>
    </EVE.CAMS>
  </EVE>
</EVE>

Notice the nested EVE nodes, liquid is not able to navigate through this XML.
For example this liquid assignment will not work:

{%- assign title = content.EVE.EVE['EVE.CAMS'].EVE_TITL -%}

The business scenario that I encountered was in a Logic App (Std) workflow, and the fix I had to implement was to remove whitespace from the XML input, rename the nested and then use the liquid map i.e. in a compose action:

xml(replace(replace(string(xml(string(triggerBody()))),'',''),'',''))

Then the liquid assignment that now works look like this:

{%- assign title = content.EVE.EVE2['EVE.CAMS'].EVE_TITL -%}