Add a new function to convert from a DataElement

This fixes feature request #30
Merge branch 'release'