lib/geoblacklight/metadata_transformer/base.rb
##
# Clean top-level HTML elements from GeoCombine HTML Documents (e. g. <html> and <body>)
# @return [Nokogiri::XML::Document] the Nokogiri XML Document for the cleaned HTML
Clean top-level HTML elements from GeoCombine HTML Documents (e. g.  and )
Clean top - level HTML elements from GeoCombine HTML Documents ( e . g . and )
def cleaned_metadata
        transformed_doc = Nokogiri::XML(@metadata.to_html)
        if transformed_doc.xpath('//body').children.empty?
          fail TransformError,\
               'Failed to extract the <body> child elements from the transformed metadata'
        end
        transformed_doc.xpath('//body').children
      rescue => e
        raise TransformError, e.message
      end
def cleaned_metadata transformed_doc = Nokogiri :: XML ( @metadata . to_html ) if transformed_doc . xpath ( '//body' ) . children . empty? fail TransformError , 'Failed to extract the <body> child elements from the transformed metadata' end transformed_doc . xpath ( '//body' ) . children rescue => e raise TransformError , e . message end
Clean top-level HTML elements from GeoCombine HTML Documents (e. g. <html> and <body>)
Clean top - level HTML elements from GeoCombine HTML Documents ( e . g . <html > and <body > )
the Nokogiri XML Document for the cleaned HTML
the Nokogiri XML Document for the cleaned HTML
Nokogiri::XML::Document