Parse BookmarkStart object
 @param node [Nokogiri::XML:Element] node to parse
 @return [BookmarkStart] result of parsing
778915
def parse(node)
      node.attributes.each do |key, value|
        case key
        when 'id'
          @id = value.value.to_i
        when 'name'
          @name = value.value
        end
      end
      self
    end
104076
def parse(node)
      node.xpath('*').each do |node_child|
        case node_child.name
        when 'sp'
          @elements << DocxShape.new(parent: self).parse(node_child).dup
        when 'pic'
          @elements << DocxPicture.new(parent: self).parse(node_child)
        when 'graphicFrame'
          @elements << GraphicFrame.new(parent: self).parse(node_child)
        when 'grpSp'
          @elements << ShapesGrouping.new(parent: self).parse(node_child)
        when 'cxnSp'
          @elements << ConnectionShape.new(parent: self).parse(node_child)
        end
      end
      self
    end
443203
def parse(node)
      node.xpath('*').each do |child_node|
        case child_node.name
        when 'from'
          @from = XlsxDrawingPositionParameters.new(parent: self).parse(child_node)
        when 'to'
          @to = XlsxDrawingPositionParameters.new(parent: self).parse(child_node)
        when 'sp'
          @shape = DocxShape.new(parent: self).parse(child_node)
        when 'grpSp'
          @grouping = ShapesGrouping.new(parent: self).parse(child_node)
        when 'pic'
          @picture = DocxPicture.new(parent: self).parse(child_node)
        when 'graphicFrame'
          @graphic_frame = GraphicFrame.new(parent: self).parse(child_node)
        when 'cxnSp'
          @shape = ConnectionShape.new(parent: self).parse(child_node)
        end
      end
      self
    end
428996
def parse(node)
      node.xpath('*').each do |spacing_node_child|
        case spacing_node_child.name
        when 'lnSpc'
          self.line = Spacing.parse_spacing_value(spacing_node_child)
          self.line_rule = Spacing.parse_spacing_rule(spacing_node_child)
        when 'spcBef'
          self.before = Spacing.parse_spacing_value(spacing_node_child)
        when 'spcAft'
          self.after = Spacing.parse_spacing_value(spacing_node_child)
        end
      end
    end
42115
def parse(node)
      node.xpath('*').each do |node_child|
        case node_child.name
        when 'tnLst'
          @time_node_list = TimeNode.parse_list(node_child)
        end
      end
      self
    end
16636
def parse(node)
      @list = node.xpath('c:f')[0].text.split('!').first
      coordinates = Coordinates.parser_coordinates_range(node.xpath('c:f')[0].text) # .split('!')[1].gsub('$', ''))
      return self unless coordinates

      node.xpath('c:numCache/c:pt').each_with_index do |point_node, index|
        point = ChartPoint.new(coordinates[index])
        point.value = point_node.xpath('c:v').first.text.to_f unless point_node.xpath('c:v').first.nil?
        @points << point
      end
      self
    end
1190097
def parse_element(ele)
      if ele.is_a? Nokogiri::XML::Text
        return "#{ele.text}\n"
      else
        if (children = ele.children).count > 0
          return wrap_node(ele,children.map {|ele| parse_element(ele)}.join )
        else
          return wrap_node(ele,ele.text)
        end
      end
    end
382507
def parse(node)
      @fill_color = DocxColor.new(parent: self).parse(node)
      node.xpath('*').each do |node_child|
        case node_child.name
        when 'xfrm'
          @shape_size = DocxShapeSize.new(parent: self).parse(node_child)
        when 'prstGeom'
          @preset_geometry = PresetGeometry.new(parent: self).parse(node_child)
        when 'txbx'
          @text_box = TextBox.parse_list(node_child)
        when 'ln'
          @line = DocxShapeLine.new(parent: self).parse(node_child)
        when 'blipFill'
          @blip_fill = BlipFill.new(parent: self).parse(node_child)
        when 'custGeom'
          @preset_geometry = PresetGeometry.new(parent: self).parse(node_child)
          @preset_geometry.name = :custom
          @custom_geometry = OOXMLCustomGeometry.new(parent: self).parse(node_child)
        end
      end
      self
    end
673752
def parse(node)
      @type = node.name.to_sym
      case node.name
      when 'blinds', 'checker', 'comb', 'cover', 'pull', 'push', 'randomBar', 'strips', 'wipe', 'zoom', 'warp'
        @direction = value_to_symbol(node.attribute('dir')) if node.attribute('dir')
      when 'cut', 'fade'
        @through_black = option_enabled?(node, 'thruBlk')
      when 'split'
        @direction = value_to_symbol(node.attribute('dir')) if node.attribute('dir')
        @orientation = node.attribute('orient').value.to_sym if node.attribute('orient')
      when 'wheel', 'wheelReverse'
        @spokes = option_enabled?(node, 'spokes')
      end
      self
    end
806277
def node_start(node)
      @node = node
      self.class.get_callbacks("start_#{node.sexp_type}".to_sym).each do |block|
        self.instance_exec(node, &block)
      end
    end
744392
def parse(node)
      node.attributes.each do |key, value|
        case key
        when 'ilvl'
          @ilvl = value.value.to_f
        end
      end

      node.xpath('*').each do |num_level_child|
        case num_level_child.name
        when 'start'
          @start = ValuedChild.new(:integer, parent: self).parse(num_level_child)
        when 'numFmt'
          @numbering_format = NumberingFormat.new(parent: self).parse(num_level_child)
        when 'lvlText'
          @text = LevelText.new(parent: self).parse(num_level_child)
        when 'lvlJc'
          @justification = LevelJustification.new(parent: self).parse(num_level_child)
        when 'pPr'
          @paragraph_properties = ParagraphProperties.new(parent: self).parse(num_level_child)
        when 'rPr'
          @run_properties = RunProperties.new(parent: self).parse(num_level_child)
        when 'suff'
          @suffix = @suffix.parse(num_level_child)
        end
      end

      self
    end
1175568
def parse(node)
      node.xpath('*').each do |node_child|
        case node_child.name
        when 'dPr'
          node_child.xpath('*').each do |node_child_child|
            case node_child_child.name
            when 'begChr'
              @begin_character = ValuedChild.new(:string, parent: self).parse(node_child_child)
            when 'endChr'
              @end_character = ValuedChild.new(:string, parent: self).parse(node_child_child)
            end
          end
        end
      end
      @value = DocxFormula.new(parent: self).parse(node)
      self
    end
851985
def parse(node)
      node.xpath('*').each do |node_child|
        case node_child.name
        when 'lnL', 'left'
          @left = TableCellLine.new(parent: self).parse(node_child)
        when 'lnR', 'right'
          @right = TableCellLine.new(parent: self).parse(node_child)
        when 'lnT', 'top'
          @top = TableCellLine.new(parent: self).parse(node_child)
        when 'lnB', 'bottom'
          @bottom = TableCellLine.new(parent: self).parse(node_child)
        when 'lnTlToBr', 'tl2br'
          @top_left_to_bottom_right = TableCellLine.new(parent: self).parse(node_child)
        when 'lnBlToTr', 'tr2bl'
          @top_right_to_bottom_left = TableCellLine.new(parent: self).parse(node_child)
        when 'insideV'
          @inner_vertical = TableCellLine.new(parent: self).parse(node_child)
        when 'insideH'
          @inner_horizontal = TableCellLine.new(parent: self).parse(node_child)
        end
      end
      self
    end
1228438
def parse(node)
      node.attributes.each do |key, value|
        case key
        when 'leftFromText'
          @left = OoxmlSize.new(value.value.to_f)
        when 'rightFromText'
          @right = OoxmlSize.new(value.value.to_f)
        when 'topFromText'
          @top = OoxmlSize.new(value.value.to_f)
        when 'bottomFromText'
          @bottom = OoxmlSize.new(value.value.to_f)
        when 'tblpX'
          @position_x = OoxmlSize.new(value.value.to_f)
        when 'tblpY'
          @position_y = OoxmlSize.new(value.value.to_f)
        when 'vertAnchor'
          @vertical_anchor = value.value.to_sym
        when 'horzAnchor'
          @horizontal_anchor = value.value.to_sym
        when 'tblpXSpec'
          @horizontal_align_from_anchor = value.value.to_sym
        when 'tblpYSpec'
          @vertical_align_from_anchor = value.value.to_sym
        end
      end
      self
    end
1171316
def parse(node)
      node.attributes.each do |key, value|
        case key
        when 'type'
          @type = value.value.to_sym
        when 'styleId'
          @style_id = value.value
        when 'default'
          @default = attribute_enabled?(value.value)
        end
      end
      node.xpath('*').each do |subnode|
        case subnode.name
        when 'name'
          @name = subnode.attribute('val').value
        when 'basedOn'
          @based_on = subnode.attribute('val').value
        when 'next'
          @next_style = subnode.attribute('val').value
        when 'rPr'
          @run_properties = DocxParagraphRun.new(parent: self).parse_properties(subnode)
        when 'pPr'
          @paragraph_properties = ParagraphProperties.new(parent: self).parse(subnode)
        when 'tblPr'
          @table_properties = TableProperties.new(parent: self).parse(subnode)
        when 'trPr'
          @table_row_properties = TableRowProperties.new(parent: self).parse(subnode)
        when 'tcPr'
          @table_cell_properties = CellProperties.new(parent: self).parse(subnode)
        when 'tblStylePr'
          @table_style_properties_list << TableStyleProperties.new(parent: self).parse(subnode)
        when 'qFormat'
          @q_format = true
        end
      end
      fill_empty_table_styles
      self
    end
1329580
def parse(node)
      node.attributes.each do |key, value|
        case key
        when 'applyFont'
          @apply_font = attribute_enabled?(value)
        when 'applyBorder'
          @apply_border = attribute_enabled?(value)
        when 'applyFill'
          @apply_fill = attribute_enabled?(value)
        when 'applyNumberFormat'
          @apply_number_format = attribute_enabled?(value)
        when 'applyAlignment'
          @apply_alignment = attribute_enabled?(value)
        when 'fontId'
          @font_id = value.value.to_i
        when 'borderId'
          @border_id = value.value.to_i
        when 'fillId'
          @fill_id = value.value.to_i
        when 'numFmtId'
          @number_format_id = value.value.to_i
        when 'quotePrefix'
          @quote_prefix = attribute_enabled?(value)
        end
      end
      node.xpath('*').each do |node_child|
        case node_child.name
        when 'alignment'
          @alignment.parse(node_child) if @apply_alignment
        end
      end
      self
    end
816117
def parse(node)
      text_box_content_node = node.xpath('w:txbxContent').first
      text_box_content_node.xpath('*').each_with_index do |node_child, index|
        case node_child.name
        when 'p'
          @elements << DocxParagraph.new(parent: self).parse(node_child, index)
        when 'tbl'
          @elements << Table.new(parent: self).parse(node_child, index)
        when 'bodyPr'
          @properties = OOXMLShapeBodyProperties.new(parent: self).parse(node_child)
        end
      end
      self
    end