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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T21:12:02+00:00 2026-06-13T21:12:02+00:00

Using Rails and ActiveResource i am getting non-rails style of XML response form third-party

  • 0

Using Rails and ActiveResource i am getting non-rails style of XML response form third-party API. Object which i like to map is basically wrapped in prestahop element. What should i override to get rid of that element to map the object correctly?

<prestashop xmlns:xlink="http://www.w3.org/1999/xlink">
<order>
    <id></id> 
  • 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-13T21:12:04+00:00Added an answer on June 13, 2026 at 9:12 pm

    You should use custom formatter for your needs, something like this may be good solution.

    class PrestaXMLFormatter
      include ActiveResource::Formats::XmlFormat
    
      def decode(xml)
        ActiveResource::Formats::XmlFormat.decode(xml)['prestashop']
      end
    end
    
    class Order < ActiveResource::Base
      self.format = PrestaXMLFormatter.new
    end  
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using ActiveResource against a non-Rails REST API... in fact even the Rest
just getting started with Rails, I would like to consume a webservice (using ActiveResource)
I have rails applications, which communicate with each other using ActiveResource. I have setup
I've got a non-Rails RESTful API that I can easily connect to with ActiveResource,
In my rails app, I am using ActiveResource to access another service, and I'd
Using Rails I'm trying to get an error message like The song field can't
I am using Rails 3.2.8 and the excellent client_side_validations gem and would also like
I'm trying to get the account info from Unfuddle API using ActiveResource The url
I'm writing a client that consumes a non-REST API (i.e. GET site.com/gettreasurehunts), which requires
Using Rails 3 I am consuming an XML feed generated in drupal or something.

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.