Class: Datacite::Mapping::IdentifierNode

Inherits:
XML::Mapping::ObjectNode
  • Object
show all
Includes:
EmptyNodeUtils
Defined in:
lib/datacite/mapping/identifier.rb

Overview

Custom node to allow (but ignore) if we read an XML <resource/> that's missing its <identifier/>.

Instance Method Summary collapse

Methods included from EmptyNodeUtils

#not_empty

Instance Method Details

#xml_to_obj(_obj, xml)



70
71
72
# File 'lib/datacite/mapping/identifier.rb', line 70

def xml_to_obj(_obj, xml)
  return super if (element = has_element?(xml)) && not_empty(element)
end