Xlsxir v1.0.0 Xlsxir.ParseString

Holds the SAX event instructions for parsing sharedString data via Xlsxir.SaxParser.parse/2

Summary

Functions

Sax event utilized by Xlsxir.SaxParser.parse/2. Takes a pattern and the current state of a struct and recursivly parses the sharedString XML file, ultimately sending each parsed string to the Xlsxir.SharedString module which contains an ETS process started by Xlsxir.SaxParser.parse/2

Functions

sax_event_handler(arg1, state)

Sax event utilized by Xlsxir.SaxParser.parse/2. Takes a pattern and the current state of a struct and recursivly parses the sharedString XML file, ultimately sending each parsed string to the Xlsxir.SharedString module which contains an ETS process started by Xlsxir.SaxParser.parse/2.

Parameters

  • pattern - the XML pattern of the event to match on
  • state - current state of the %Xlsxir.ParseString{} struct

Example

Recursively sends strings from the xl/sharedStrings.xml file to Xlsxir.SharedString.add_shared_string/2. The data can ultimately be retreived by the get_at/1 function of the Xlsxir.SharedString module (i.e. Xlsxir.SharedString.get_at(0) would return something like "string 1").