Class: Uniword::Mhtml::XmlPart

Inherits:
MimePart
  • Object
show all
Defined in:
lib/uniword/mhtml/xml_part.rb

Overview

XML MIME part — filelist.xml, props*.xml, colorschememapping.xml, etc.

Instance Method Summary collapse

Methods inherited from MimePart

#decoded_content, #decoded_content=, #filename, #html_content?, #image_content?, #text_content?, #theme_content?, #xml_content?

Instance Method Details

#to_xmlObject



13
14
15
# File 'lib/uniword/mhtml/xml_part.rb', line 13

def to_xml
  decoded_content
end

#xml_contentObject



7
8
9
10
11
# File 'lib/uniword/mhtml/xml_part.rb', line 7

def xml_content
  @xml_content ||= Nokogiri::XML(decoded_content) { |config| config.strict.noblanks }
rescue Nokogiri::XML::SyntaxError
  @xml_content ||= Nokogiri::XML(decoded_content)
end