Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Support for assigning a node's content to an attribute. #9

Closed
technicalpickles opened this Issue Jul 4, 2010 · 2 comments

Comments

Projects
None yet
3 participants
Contributor

technicalpickles commented Jul 4, 2010

I was working on a wrapper for backpack's API, and they return XML like:

<note id='1132' title='My world!' created_at='2007-07-03 19:15:55'>
  It's a pretty place
</note>

A limitation of happymapper's API is that it doesn't let you easily get at "It's a pretty place". So, I slung together some code to let you:

module Backpack
  class Note
    include HappyMapper
    content :body
  end
end

I went with the term 'content' to match LibXML::XML::Node's naming.

Check it out: http://github.com/technicalpickles/happymapper/tree/content

Owner

jnunemaker commented Jul 4, 2010

Pulled.

Hells yes!

This issue was closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment