What does it take to get the "LyricArtist" from this XML feed using Nokogiri?

Posted by fail. on Stack Overflow See other posts from Stack Overflow or by fail.
Published on 2010-06-13T20:27:18Z Indexed on 2010/06/13 20:32 UTC
Read the original article Hit count: 237

Filed under:
|
|

First the xml: http://api.chartlyrics.com/apiv1.asmx//GetLyric?lyricId=90&lyricCheckSum=9600c891e35f602eb6e1605fb7b5229e

doc = Nokogiri::XML(open("http://api.chartlyrics.com/apiv1.asmx//GetLyric?lyricId=90&lyricCheckSum=9600c891e35f602eb6e1605fb7b5229e"))

Successfully will grab the document content.

After this point i am unable to get inside and grab data and i am not sure why?

For example, i would expect:

doc.xpath("//LyricArtist")

To kick back the artist but it does not.

I have tried the same thing with other feeds, such as the default RSS feed that any wordpress installation provides and if i do something like:

doc.xpath("//link")

I get a list of all the "links".

I am definitely missing something and would love your input. thank you!!

© Stack Overflow or respective owner

Related posts about Xml

Related posts about ruby