LVA Tiss Einbindung - erster Entwurf

This commit is contained in:
Andreas Stephanides
2013-03-24 14:01:11 +01:00
parent d6ce165782
commit bcf90e2590
4 changed files with 80 additions and 9 deletions

View File

@@ -28,10 +28,13 @@ end
begin
@hash=Hash.from_xml(open(url).read)["tuvienna"]
@person=[]
# @person = @hash["course"]["lecturers"]["oid"]
if @hash["course"]["lecturers"]["oid"].is_a? String
@person = @hash["course"]["lecturers"]["oid"]
else
@hash["course"]["lecturers"]["oid"].each do |pid|
@person << Hash.from_xml(open("https://tiss.tuwien.ac.at/adressbuch/adressbuch/person_via_oid/" + pid.to_s + ".xml").read)["tuvienna"]["person"]
end
end
rescue OpenURI::HTTPError => e
end
end