# Help! Fetch xml from an external source, then pass it into a form

**URL:** <https://www.ruby-forum.com/t/help-fetch-xml-from-an-external-source-then-pass-it-into-a-form/188100>\
**Category:** Rails\
**Created:** [May 5, 2010, 6:48pm UTC](https://www.ruby-forum.com/t/help-fetch-xml-from-an-external-source-then-pass-it-into-a-form/188100 "2010-05-05T18:48:57Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![roflkk](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/b782af/32.png) [@roflkk](https://www.ruby-forum.com/u/roflkk)\
**Post date:** [May 5, 2010, 6:48pm UTC](https://www.ruby-forum.com/t/help-fetch-xml-from-an-external-source-then-pass-it-into-a-form/188100/1 "2010-05-05T18:48:57Z")

</div>

OK, I’m looking for tips and help regarding fetching xml data from an  
external source and  
then parsing it into a form.

What do I need to make this happen?

Example:  
I have an Advert Model (which is for books)

fields do  
isbn :string  
title :string, :required  
author :string, :required  
edition :string  
condition enum\_string(:As new, :Good, :OK, :Bad)  
price :string  
timestamps  
end

I want to allow the user to click on the “New Advert” link in the  
Adverts index page, enter the isbn number, then press a button or  
click a link to do a ajaxified lookup to an API service like  
[isbndb.com](http://isbndb.com) to get the rest of the data about the book like author,  
publisher and populate those fields on the New Advert page, and allow  
the user to review the data before clicking the Save Advert or Cancel  
button.

Would love some ideas or help. Anything would be very much appreciated.
