简体   繁体   中英

Read XML file from android assets folder and send to server

I have created a XML file in assets folder and I want to read that file and fetch the contents and send details to server..

How can I do that in android

I am writing some code to read a file from assets .. It may help you..

//Open your file from  assets as  input stream
        InputStream myInput = myContext.getAssets().open(fileName);

By using this input stream u can read your file from assets folder..

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM