how to read sdmx/ xml file in R

I am trying to read the following file (https://www.imf.org/-/media/Files/Publications/WEO/WEO-Database/2022/WEOApr2022-SDMXData.ashx) which is located in
https://www.imf.org/en/Publications/WEO/weo-database/2022/April/download-entire-database

I am wondering how to read it using xml2? or should i use rsdmx package?
Thanks

I think that is a perfectly reasonable assumption.

if this is the case,

dataset <- readSDMX("WEO_PUB_APR2022.xml", isURL = FALSE)
stats <- as.data.frame(dataset, labels=TRUE)

how to link the dataset with its labels?
Pleas advise.

Seems that for that you wouldn't access via the file but through service provider api, using the dsd options

if u have downloaded the zip file, you will find 2 files inside,
https://www.imf.org/-/media/Files/Publications/WEO/WEO-Database/2022/WEOApr2022-SDMXData.ashx
WEO_PUB_APR2022.xml which is the data
and
WEO_PUB_APR2022.xsd which contains definiation.
I want to read the second file as dataframe or use directly with the first file to get full dataset with its definitions.