How can I read a xml file to extract the data using Python

How can I read a xml file to extract the data using python? I am having memory issues in R and I think Python has more options to handle large files. Thanks in advance

The Python package ipumspy can be used to read IPUMS data into a Pandas frame. See this page for sample code to read a fixed-width or .csv IPUMS extract data file into Python using an IPUMS .xml DDI file.

Thanks Isabel for your prompt response!