I've been trying to Google and find some guides or heads-up on how to do this, but to no avail. I don't quite know if the title is right even. I don't know the term whether it's meta programming, or just parsing XML data to Rails.
Let's say I have this third-party who has agreed to provide XML API to feed data to my website. I would like to receive the data and store it in my model. I checked through SO and found this link which partly answers my question: Parse then Store XML Data from API in Ruby on Rails, but I would like to know the exact way to apply on my third-party's method.
Sample Property Information Request
http://third-party.com/xmlapi/PropertyInformation.php?PropertyNumber=113
Sample Property Information Request Results
<?xml version="1.0" ?>
<PropertyInformation size="1">
<Property size="12">
<propertyNumber>113</propertyNumber>
<propertyName>Kinlay House Christchurch</propertyName>
<address1>2-12 Lord Edward Street</address1>
<address2>Dublin 2</address2>
<city>Dublin</city>
<country>Ireland</country>
<description>Situated in the Temple Bar district in the heart of Dublin, Kinlay House offers a wide selection of clean and comfortable rooms that won't break the bank. Temple Bar offers visitors an unrivalled selection of bars, cafes and restaurants, all infused with a lively Irish flavour. Within easy walking distance of Grafton Street - Dublin's main shopping Street - and the vast selection of museums, galleries and tourist attractions that the city has to offer. Come and enjoy the great atmosphere and vibrant spirit! <i>YOU CAN ALSO BOOK KINLAY HOUSE CORK AND KINLAY HOUSE GALWAY ONLINE</i> Self-catering kitchen 24 hour staffing, no curfew Security lockers/luggage storage Tourist Information & booking service International pay phones Family friendly</description>
</Property>
</PropertyInformation>
I have the PropertyNumber in my model column. How do I write to parse and store the information to my model with the structured URL?
In fact, any links that I can learn all these?
Many thanks!