web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Automate
Answered

Extract XML

(0) ShareShare
ReportReport
Posted on by

Hello!

 

My flow uses a custom connector to get the exchange rate between US$ and other currencies, and update that information later.

The custom connector give me the exchange rate and a bunch of other stuff in XML.

For the example in the picture below, I'm converting from US to CAD and the number I need here is "1.2689".

I tried this formula but I get nothing.

Any help is appreciated!

 

sam_sonepar_0-1613069792103.png

 

XML CONTENT

<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF
    xmlns="http://purl.org/rss/1.0/"
        <title>Daily exchange rates</title>
        <link>https://www.bankofcanada.ca/?p=39898</link>
        <description>Daily average exchange rates - published once each business day by 16:30 ET. All Bank of Canada exchange rates are indicative rates only.</description>
        <items>
            <rdf:Seq>
                <rdf:li rdf:resource="https://www.bankofcanada.ca/valet/fx_rss/FXUSDCAD" />
            </rdf:Seq>
        </items>
        <dc:language>en</dc:language>
    </channel>
        <title>CA: 1.2689 CAD = 1 USD 2021-02-10</title>
        <link>https://www.bankofcanada.ca/?p=39898</link>
        <description>1 USD = 1.2689 CAD (US dollar to Canadian dollar daily exchange rate)</description>
        <dc:date>2021-02-10T21:30:00Z</dc:date>
        <dc:language>en</dc:language>
        <cb:statistics>
            <cb:country>CA</cb:country>
            <cb:exchangeRate>
                <cb:value decimals="4">1.2689</cb:value>
                <cb:baseCurrency>CAD</cb:baseCurrency>
                <cb:targetCurrency>USD</cb:targetCurrency>
                <cb:rateType>Bank of Canada exchange rate</cb:rateType>
                <cb:observationPeriod frequency="daily">2021-02-10T21:30:00Z</cb:observationPeriod>
            </cb:exchangeRate>
        </cb:statistics>
    </item>
</rdf:RDF>
Categories:
I have the same question (0)
  • Verified answer
    Paulie78 Profile Picture
    8,422 Moderator on at

    Try this:

    json(xml(outputs('Compose')))['rdf:RDF']['item']['cb:statistics']['cb:exchangeRate']['cb:value']['#text']

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 519 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 296 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard