Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6587063
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T16:52:13+00:00 2026-05-25T16:52:13+00:00

Hello i’m new to android and in my application i want to get some

  • 0

Hello i’m new to android and in my application i want to get some data from an XML file..but it gives an error saying file not found error..Can anyone tell me how to correctly ponit to a file in android.Thanx in advance.

Exception:-

09-18 12:24:19.889: WARN/System.err(2550): java.io.FileNotFoundException: /res/xml/persons.xml (No such file or directory)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T16:52:13+00:00Added an answer on May 25, 2026 at 4:52 pm

    Content stored within the /res/ folder is not within the regular filesystem. You need to access it from the resources. Call getResources from your activity, and you can see the functions there to operate on resources. Depending on what are you calling, there may already be an overload that takes a resource id already. Note that it might make more sense to move your xml to the /raw/ folder instead of /xml/.

    You can open an InputStream to your resource file like this:

    InputStream is = context.getResources().openRawResource(R.xml.persons);
    

    ‘context’ would generaly be your activity.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hello! I've been programming for a long time but just started developing for android,
Hello I wrote an application and while deploying shows error in line mCamera=Camera.open(); Where
hello friends i am trying to get a list of user id and want
Hello ever one I want to ask a question about file opening.I want to
Hello there I am new to php and want to learn to write reusable
Hello I have the following code to retrieve data from my db using nhibernate
Hello I have created an application using qt and I managed to save some
hello i wanted to build I get $date and $date1 from form xxx. I
Hello I want to convert a PDF file to text file. I am converting
Hello all in my iphone application after sending login xml request am getting following

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.