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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T11:55:34+00:00 2026-06-13T11:55:34+00:00

I working with it for two days… I want get remote xml then parse/map

  • 0

I working with it for two days… I want get remote xml then parse/map it to core data. I have read bunch of tutorials, so at this moment I can connect with local server (yyuupii!), get xml, but I have problem with mapping. I get

-[RKObjectLoader canParseMIMEType:] Unable to find parser for MIME Type ‘application/xml’

-[RKObjectLoader isResponseMappable] Encountered unexpected response with status code: 200 (MIME Type: application/xml -> URL:
http:///list.xml — http:/// —
http:/// — http:///) 2012-10-24
14:13:12.201 Sierpien[4650:907] Error
Domain=org.restkit.RestKit.ErrorDomain Code=4 “The operation couldn’t
be completed. (org.restkit.RestKit.ErrorDomain error 4.)”

Could you gave me some advice I will be thankful.

My XML

<packs>
    <pack>
        <cover>cover.png</cover>
        <info>Jakis.adres.pl</info>
        <link>Opis</link>
        <name>wrzesień</name>
        <price>5.00</price>
    </pack>
    <pack>
        <cover>cover2.png</cover>
        <info>Jakis1.adres.pl</info>
        <link>Opis31</link>
        <name>wrzesień12</name>
        <price>15.00</price>
    </pack>
</packs>

My Entity

@interface Pack : NSManagedObject

@property (nonatomic, retain) NSString * name;
@property (nonatomic, retain) NSString * link;
@property (nonatomic, retain) NSString * price;
@property (nonatomic, retain) NSString * info;
@property (nonatomic, retain) NSString * cover;

@end

My Implementation

- (id)initClient
{
    self = [super init];
    if (self) {
        RKObjectManager *client = [RKObjectManager objectManagerWithBaseURL:[RKURL URLWithString:@"http://10.1.1.5:8888/"]];
        NSLog(@"I am your RKObjectManager singleton : %@", [RKObjectManager sharedManager]);
        client.serializationMIMEType = RKMIMETypeXML;

        RKObjectMapping* listMapping = [RKObjectMapping mappingForClass:[Pack class]];
        [listMapping mapKeyPath:@"cover" toAttribute:@"cover"];
        [listMapping mapKeyPath:@"name" toAttribute:@"name"];
        [listMapping mapKeyPath:@"info" toAttribute:@"info"];
        [listMapping mapKeyPath:@"link" toAttribute:@"link"];
        [listMapping mapKeyPath:@"price" toAttribute:@"price"];

        [[RKObjectManager sharedManager].mappingProvider setMapping:listMapping forKeyPath:@"packs.pack"];
    }
    return self;
}

- (void)loadPacks {
    [[RKObjectManager sharedManager] loadObjectsAtResourcePath:@"/list.xml" delegate:self];
}
  • 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-06-13T11:55:34+00:00Added an answer on June 13, 2026 at 11:55 am

    Ok I throw away RKObjectManager, now I connect with RKClient, get xml with

    [[RKClient sharedClient] get:@"/list.xml" delegate:self];

    Then I parse Xml by GDataXML, fill Pack with that parsed data. It works.

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

Sidebar

Related Questions

I've been working at this for two days and have not had much luck.
I'm very new to python. two days. trying to get a plot working with
I have been working on this for about two days....I have a RadioButtonList that
For the past two days, I have been working on a project, and no
I've been working on this for two days, can't get it, I need some
I just wrote a stored function to calculate the working days between two dates.
I've been asking a question or two over the past few days of working
I am working out the months, days, hours and minutes between two dates, I
I am trying to map the collection for two days without success. I also
I have a site which is in online, two days back i create a

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.