Method: RubyXL::OOXMLTopLevelObject.parse_file
- Defined in:
- lib/rubyXL/objects/ooxml_object.rb
.parse_file(zip_file, file_path) ⇒ Object
Generates the top-level OOXML object by parsing its XML file from the contents of the .xslx container.
Parameters
-
zip_file-.xslxfile asZip::Fileobject -
file_path- path to the subject file inside the.xslxzip archive
450 451 452 453 454 |
# File 'lib/rubyXL/objects/ooxml_object.rb', line 450 def self.parse_file(zip_file, file_path) entry = zip_file.find_entry(RubyXL::from_root(file_path)) # Accomodate for Nokogiri Java implementation which is incapable of reading from a stream entry && (entry.get_input_stream { |f| parse(defined?(JRUBY_VERSION) ? f.read : f) }) end |