rexml help

jon wrote:

:description => pDoc.elements['/rsp/photo/descripton'].text,

:description => de_nil(pDoc.elements['/rsp/photo/descripton']).text,

def de_nil(q)    return q if q    require 'ostruct'    return OpenStruct(:text => '') end

That's the "Null Object Refactor" in a nutshell. Google for all my terms because I might have the details wrong.