class Datacite::Mapping::IdentifierNode
Custom node to allow (but ignore) if we read an XML
‘<resource/>` that’s missing its ‘<identifier/>`.
Public Instance Methods
xml_to_obj(_obj, xml)
click to toggle source
Calls superclass method
# 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
Private Instance Methods
has_element?(xml)
click to toggle source
# File lib/datacite/mapping/identifier.rb, line 76 def has_element?(xml) # rubocop:disable Naming/PredicateName @path.first(xml) rescue XML::XXPathError false end