Hi I am creating a hash as detailed below
hPhotoDetails = {
:photoId =>
pDoc.elements[’/rsp/photo’].attributes.get_attribute(“id”).value,
:title => pDoc.elements[’/rsp/photo/title’].text,
:description => pDoc.elements[’/rsp/photo/descripton’].text,
}
if the element /rsp/photo/descripton == or does not exist
an error is thrown.
Is there a way to get it to add nil if it does not exist without
breaking out of the hash creation?
Thanks
jon