Respond to native, import and read local XML file

I am new to the React Native framework. I am trying to use it to create a cross-platform mobile application. I want to open and read the local XML file present in the folder of my application, but I cannot figure out how to do this.

My biggest problem at the moment is how to assign this local XML file to a variable, I tried using a command requireor using import, but these commands did not work.

+4
source share
1 answer

You need to convert your XML file to a javascript object so that you can work with it. Perhaps you could use react-native-xml2js

0

Source: https://habr.com/ru/post/1689813/


All Articles