Ich create Linked-Client wie folgt.So konvertieren Sie Linkedin-Client in Rails zu Hash
client = LinkedIn::Client.new("3333", "rrrrrrr")
client.authorize_from_access(session[:atoken], session[:asecret])
und erhalten Informationen über die Profile wie dieses
@profile = client.profile
, wenn ich das Profil drucken wie "puts client.profile", bekomme ich nach dem löschte
#<LinkedIn::Profile:0x4a77770 @doc=#<Nokogiri::XML::Document:0x253bb64 name="document" children=[#<Nokogiri::XML::Element:0x253b9fc name="pers
on" children=[#<Nokogiri::XML::Text:0x253b87c "\n ">, #<Nokogiri::XML::Element:0x253b84c name="first-name" children=[#<Nokogiri::XML::Text:0x
253b684 "Anthony">]>, #<Nokogiri::XML::Text:0x253b5ac "\n ">, #<Nokogiri::XML::Element:0x253b57c name="last-name" children=[#<Nokogiri::XML::
Text:0x253b3b4 "Raj S">]>, #<Nokogiri::XML::Text:0x253b2dc "\n ">, #<Nokogiri::XML::Element:0x253b2ac name="headline" children=[#<Nokogiri::X
ML::Text:0x253b0e4 "Senior Software Engineer at AB Innovative Software Pvt. Ltd">]>, #<Nokogiri::XML::Text:0x253b00c "\n ">, #<Nokogiri::XML:
:Element:0x253afdc name="site-standard-profile-request" children=[#<Nokogiri::XML::Text:0x253ae14 "\n ">, #<Nokogiri::XML::Element:0x253ade
4 name="url" children=[#<Nokogiri::XML::Text:0x253ac1c "http://www.linkedin.com/profile?viewProfile=&key=78718913&authToken=XE_V&authType=name
&trk=api*a178337*s186521*">]>, #<Nokogiri::XML::Text:0x253ab44 "\n ">]>, #<Nokogiri::XML::Text:0x253aa6c "\n">]>]>>
Wie Parsen Sie dies in eine Hasmap oder in eine Zeichenkette?
Bitte helfen Sie mir, wie ich neu auf Schienen bin.
in XML zu sehen ... http://stackoverflow.com/questions/10122342/how-to-convert-nokogiri-object-to- xml-file-in-rails/10122666 # 10122666 – davidb
Was willst du in der hashmap/string? – Phrogz