Skip to content

Instantly share code, notes, and snippets.

@imajes
Created July 16, 2010 17:07
Show Gist options
  • Save imajes/478632 to your computer and use it in GitHub Desktop.
Save imajes/478632 to your computer and use it in GitHub Desktop.
(rdb:1) asset.css("AssetId")
[#<Nokogiri::XML::Element:0x819221e8 name="AssetId" children=[#<Nokogiri::XML::Text:0x81921f68 "1038">]>]
## note how this returns an array
(rdb:1) asset.css("AssetId").inner_text
"1038"
## now i'm getting the inner text of the tag, or really the first child node. i'm behaving as if this
## is a single item but really i'm doing the op on array, so i suppose it does a map + join to make
## the output...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment