XML file parsing in ionic capacitor Project

I am building an android app using ionic capacitor. I have an xml file that is stored in Directory.Data,
I want to get some info from that file like some href attribute value, so basically I need to parse the file.
How can I achieve this?
I will use xml2js for parsing the xml file

Akshar Parmar

Read in the file using Filesystem Capacitor Plugin API | Capacitor Documentation and pass the read XML to xml2js.