Parse data for Spacing
 @param [Nokogiri::XML:Element] node with Spacing
 @return [Nothing]
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
1351744
def parse(node)
      node.attributes.each do |key, value|
        case key
        when 'orient'
          @orientation = value.value.to_sym
        when 'h'
          @height = OoxmlSize.new(value.value.to_f)
        when 'w'
          @width = OoxmlSize.new(value.value.to_f)
        end
      end
      self
    end
897040
def parse_xml(response)
      data = Nokogiri::XML(response) do |config| config.strict.noblanks end
      fail OptaSD::Error.new(xml_error_to_hast(data)), ErrorMessage.get_message(data.children.first.content.to_i) if data.css('errorCode').first.present?
      data
    end
862568
def parse(node)
      node.xpath('*').each do |node_child|
        begin
          node_child.xpath('w:drawing')
        rescue Nokogiri::XML::XPath::SyntaxError # This mean it is Chart
          case node_child.name
          when 'Choice'
            @office2010_content = ChartStyle.new(parent: self).parse(node_child)
          when 'Fallback'
            @office2007_content = ChartStyle.new(parent: self).parse(node_child)
          end
          next
        end
        case node_child.name
        when 'Choice'
          @office2010_content = DocxDrawing.new(parent: self).parse(node_child.xpath('w:drawing').first) unless node_child.xpath('w:drawing').first.nil?
          @choice = Choice.new(parent: self).parse(node_child)
        when 'Fallback'
          @office2007_content = OldDocxPicture.new(parent: self).parse(node_child.xpath('w:pict').first) unless node_child.xpath('w:pict').first.nil?
        end
      end
      self
    end
1349414
def parse(node)
      node.xpath('*').each do |node_child|
        case node_child.name
        when 'spTree'
          @shape_tree = ShapeTree.new(parent: self).parse(node_child)
        when 'bg'
          @background = Background.new(parent: self).parse(node_child)
        end
      end
      self
    end
632322
def parse(node)
      node.xpath('*').each do |node_child|
        case node_child.name
        when 'dLblPos'
          @position = value_to_symbol(node_child.attribute('val'))
        when 'showLegendKey'
          @show_legend_key = true if node_child.attribute('val').value == '1'
        when 'showVal'
          @show_values = true if node_child.attribute('val').value == '1'
        when 'showCatName'
          @show_category_name = option_enabled?(node_child)
        when 'showSerName'
          @show_series_name = option_enabled?(node_child)
        when 'delete'
          @delete = option_enabled?(node_child)
        end
      end
      self
    end
831088
def parse(node)
      node.attributes.each do |key, value|
        case key
        when 'w'
          @width = value.value.to_f
        when 'h'
          @height = value.value.to_f
        when 'stroke'
          @stroke = value.value.to_f
        end
      end
      node.xpath('*').each do |node_child|
        @elements << DocxShapeLineElement.new(parent: self).parse(node_child)
      end
      self
    end
1083131
def parse_Element(self, node):
        
        name = node.tagName
        ignores = self.ignores
        if name in ignores:
            return
        attr = "do_%s" % name
        if hasattr(self, attr):
            handlerMethod = getattr(self, attr)
            handlerMethod(node)
        else:
            self.generic_parse(node)
667576
def parse(file)
      return nil unless File.exist?(file)

      document = parse_xml(file)
      node = document.xpath('*').first

      node.attributes.each do |key, value|
        case key
        when 'count'
          @count = value.value.to_i
        when 'uniqueCount'
          @unique_count = value.value.to_i
        end
      end

      node.xpath('*').each do |node_child|
        case node_child.name
        when 'si'
          @string_indexes << StringIndex.new(parent: self).parse(node_child)
        end
      end
      self
    end
1273240
def parse(node)
      node.attributes.each do |key, value|
        case key
        when 'firstLine'
          @first_line_indent = OoxmlSize.new(value.value.to_f)
        when 'left'
          @left_indent = OoxmlSize.new(value.value.to_f)
        when 'right'
          @right_indent = OoxmlSize.new(value.value.to_f)
        when 'hanging'
          @hanging_indent = OoxmlSize.new(value.value.to_f)
        end
      end
      self
    end
233353
function(node) {
        var data = []

        for (var i = 0, len = node.childNodes.length; i < len; i++) {
            var child = node.childNodes[i]
            if (child.nodeType != ELEMENT_NODE) {
                continue
            }

            data.push(this._parseNode(child))
        }

        return data
    }
421101
def parse(node)
      node.xpath('*').each do |node_child|
        case node_child.name
        when 'solidFill'
          @type = :solid
          @color = Color.new(parent: self).parse_color_model(node_child)
        when 'gradFill'
          @type = :gradient
          @color = GradientColor.new(parent: self).parse(node_child)
        when 'noFill'
          @color = :none
          @type = :none
        when 'srgbClr'
          @color = Color.new(parent: self).parse_hex_string(node_child.attribute('val').value)
        when 'schemeClr'
          @color = Color.new(parent: self).parse_scheme_color(node_child)
        end
      end
      self
    end
1220216
def parse(parent_node)
    #return parse_nongreedy_optional(src,offset,parent_node) # nongreedy optionals break standard PEG
    node = variant_node_class.new(parent_node, delimiter_pattern)

    node.match parser.delimiter_pattern if root_rule?

    pattern_elements.each do |pe|
      return unless node.match(pe)
    end
    node.pop_match if node.last_match && node.last_match.delimiter

    node.match parser.delimiter_pattern if root_rule?

    node && node.post_match_processing
  end
713076
def parse(node)
      node.attributes.each do |key, value|
        case key
        when 'algn', 'val'
          @value = value_to_symbol(value)
        when 'leader'
          @leader = value_to_symbol(value)
        when 'pos'
          @position = OoxmlSize.new(value.value.to_f, position_unit(node))
        end
      end
      self
    end
429597
def parse(node)
      node.xpath('*').each do |node_child|
        case node_child.name
        when 'round', 'bevel'
          @type = node_child.name.to_sym
        when 'miter'
          @type = :miter
          @limit = node_child.attribute('lim').value.to_f
        end
      end
      self
    end
313314
def parse(node)
      node.xpath('*').each do |node_child|
        case node_child.name
        when 'tableStyleId'
          @table_style_id = node_child.text
        when 'tblBorders'
          @table_borders = TableBorders.new(parent: self).parse(node_child)
        when 'tblStyle'
          # TODO: Incorrect but to keep compatibility
          @table_style_element = TableStyle.new(parent: self).parse(node_child)
        when 'tblW'
          @table_width = OoxmlSize.new.parse(node_child)
        when 'jc'
          @jc = node_child.attribute('val').text.to_sym
        when 'shd'
          @shade = Shade.new(parent: self).parse(node_child)
        when 'solidFill'
          @fill = PresentationFill.new(parent: self).parse(node)
        when 'tblLook'
          @table_look = TableLook.new(parent: self).parse(node_child)
        when 'tblInd'
          @table_indent = OoxmlSize.new(node_child.attribute('w').text.to_f)
        when 'tblpPr'
          @table_positon = TablePosition.new(parent: self).parse(node_child)
        when 'tblCellMar'
          @table_cell_margin = TableMargins.new(parent: table_properties).parse(node_child)
        when 'tblStyleColBandSize'
          @table_style_column_band_size = TableStyleColumnBandSize.new(parent: self).parse(node_child)
        when 'tblStyleRowBandSize'
          @table_style_row_band_size = TableStyleRowBandSize.new(parent: self).parse(node_child)
        when 'tblLayout'
          @table_layout = TableLayout.new(parent: self).parse(node_child)
        when 'tblCellSpacing'
          @table_cell_spacing = OoxmlSize.new.parse(node_child)
        when 'tblCaption'
          @caption = ValuedChild.new(:string, parent: self).parse(node_child)
        when 'tblDescription'
          @description = ValuedChild.new(:string, parent: self).parse(node_child)
        end
      end
      @table_look = TableLook.new(parent: self).parse(node) if @table_look.nil?
      self
    end
775526
def parse(node)
      node.attributes.each do |key, value|
        case key
        when 'name'
          @name = value.value.to_s
        when 'showColumnStripes'
          @show_column_stripes = attribute_enabled?(value)
        when 'showFirstColumn'
          @show_first_column = attribute_enabled?(value)
        when 'showLastColumn'
          @show_last_column = attribute_enabled?(value)
        when 'showRowStripes'
          @show_row_stripes = attribute_enabled?(value)
        end
      end
      self
    end