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 6602837
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T18:55:32+00:00 2026-05-25T18:55:32+00:00

I’m using the plist library to load a plist file: http://code.google.com/p/plist/ I’m using code

  • 0

I’m using the plist library to load a plist file: http://code.google.com/p/plist/
I’m using code like so:

//InputStream ins = getResources().openRawResource(R.raw.skillsanddrills)
    InputStream ins = getResources().openRawResource(R.xml.skillsanddrills); //file name is skillsanddrills.plist
    NSDictionary rootDict;
    try {
    rootDict = (NSDictionary)PropertyListParser.parse(ins);
    ...

However I’m getting:

java.lang.UnsupportedOperationException: The given data is neither a
binary nor a XML property list. ASCII property lists are not
supported.

I don’t believe this is the libraries fault because I got a similar error using another plist library and the file itself is just a plan XML struture. Why would Android be changing my plist files?
Any ideas on how to fix this?

The library also accepts files instead of streams. But can’t work out how to create the file path to the file.

  • 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-25T18:55:33+00:00Added an answer on May 25, 2026 at 6:55 pm

    This should be the source code where it is crashing:

    /**
     * Parses a property list from a file. It can either be in XML or binary format.
     * @param f The property list file
     * @return The root object in the property list
     * @throws Exception If an error occurred while parsing
     */
    public static NSObject parse(File f) throws Exception {
        FileInputStream fis = new FileInputStream(f);
        String magicString = new String(readAll(fis, 8), 0, 8);
        fis.close();
        if (magicString.startsWith("bplist00")) {
            return BinaryPropertyListParser.parse(f);
        } else if (magicString.startsWith("<?xml")) {
            return XMLPropertyListParser.parse(f);
        } else {
            throw new UnsupportedOperationException("The given data is neither a binary nor a XML property list. ASCII property lists are not supported.");
        }
    }
    

    Maybe you should put your plist not in xml but the raw folder and load it like that:

    getResources().openRawResource(R.raw.skillsanddrills)
    

    If that fails put it in asset and load it like that:

    getAssets().open("filename");
    

    If that fails than your plist might be simply wrong formatted.

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

Sidebar

Related Questions

I'm new to using the Perl treebuilder module for HTML parsing and can't figure
That's pretty much it. I'm using Nokogiri to scrape a web page what has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want use html5's new tag to play a wav file (currently only supported
I ran into a problem. Wrote the following code snippet: teksti = teksti.Trim() teksti
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
I am using Paperclip to handle profile photo uploads in my app. They upload
I have a reasonable size flat file database of text documents mostly saved in
I'm parsing an XML file, the creators of it stuck in a bunch social
In order to apply a triggered animation to all ToolTip s in my app,

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.