Parse DocxColorScheme object
 @param node [Nokogiri::XML:Element] node to parse
 @return [DocxColorScheme] result of parsing
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
573703
def parse(node)
      node.xpath('*').each do |grid_child|
        case grid_child.name
        when 'gridCol'
          @columns << GridColumn.new(parent: self).parse(grid_child)
        end
      end
      self
    end
884604
def parse(node)
      node.xpath('*').each do |node_child|
        case node_child.name
        when 'tx'
          node_child.xpath('c:rich/*').each do |rich_node_child|
            case rich_node_child.name
            when 'p'
              root_object.default_font_style = FontStyle.new(true) # Default font style for chart title always bold
              @elements << Paragraph.new(parent: self).parse(rich_node_child)
              root_object.default_font_style = FontStyle.new
            end
          end
        when 'layout'
          @layout = option_enabled?(node_child)
        when 'overlay'
          @overlay = option_enabled?(node_child)
        end
      end
      self
    end
90245
def parse(node)
      node.xpath('*').each do |node_child|
        case node_child.name
        when 'blipFill'
          @type = :picture
          @value = DocxBlip.new(parent: self).parse(node_child)
          node_child.xpath('*').each do |fill_type_node_child|
            case fill_type_node_child.name
            when 'tile'
              @stretching_type = :tile
            when 'stretch'
              @stretching_type = :stretch
            when 'blip'
              fill_type_node_child.xpath('alphaModFix').each { |alpha_node| @alpha = alpha_node.attribute('amt').value.to_i / 1_000.0 }
            end
          end
        when 'solidFill'
          @type = :solid
          @value = Color.new(parent: self).parse_color_model(node_child)
        when 'gradFill'
          @type = :gradient
          @value = GradientColor.new(parent: self).parse(node_child)
        when 'pattFill'
          @type = :pattern
          @value = DocxPatternFill.new(parent: self).parse(node_child)
        end
      end
      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
247782
def parse_xml(self, node):
        
        self._set_properties(node)
        self.extend(TiledObject(self.parent, child)
                    for child in node.findall('object'))

        return self
1329902
def parse(node)
      node.xpath('*').each do |node_child|
        case node_child.name
        when 'anchor'
          @type = :flow
        when 'inline'
          @type = :inline
        end
        @properties.distance_from_text = DocxDrawingDistanceFromText.new(parent: self).parse(node_child)
        @properties.wrap = DocxWrapDrawing.new(parent: self).parse(node_child)
        node_child.attributes.each do |key, value|
          case key
          when 'relativeHeight'
            @properties.relative_height = value.value.to_i
          end
        end
        node_child.xpath('*').each do |content_node_child|
          case content_node_child.name
          when 'simplePos'
            @properties.simple_position = OOXMLCoordinates.parse(content_node_child)
          when 'extent'
            @properties.object_size = OOXMLCoordinates.parse(content_node_child, x_attr: 'cx', y_attr: 'cy', unit: :emu)
          when 'graphic'
            @graphic = DocxGraphic.new(parent: self).parse(content_node_child)
          when 'positionV'
            @properties.vertical_position = DocxDrawingPosition.new(parent: self).parse(content_node_child)
          when 'positionH'
            @properties.horizontal_position = DocxDrawingPosition.new(parent: self).parse(content_node_child)
          when 'sizeRelH'
            @properties.size_relative_horizontal = SizeRelativeHorizontal.new(parent: self).parse(content_node_child)
          when 'sizeRelV'
            @properties.size_relative_vertical = SizeRelativeVertical.new(parent: self).parse(content_node_child)
          when 'docPr'
            @doc_properties = DocProperties.new(parent: self).parse(content_node_child)
          end
        end
      end
      self
    end
1226777
def parse(node)
      link_to_table_part_xml = OOXMLDocumentObject.get_link_from_rels(node.attribute('id').value)
      doc = parse_xml(OOXMLDocumentObject.path_to_folder + link_to_table_part_xml.gsub('..', 'xl'))
      table_node = doc.xpath('xmlns:table').first
      table_node.attributes.each do |key, value|
        case key
        when 'name'
          @name = value.value.to_s
        when 'displayName'
          @display_name = value.value.to_s
        when 'ref'
          @reference = Coordinates.parser_coordinates_range value.value.to_s
        end
      end
      table_node.xpath('*').each do |node_child|
        case node_child.name
        when 'autoFilter'
          @autofilter = Autofilter.new(parent: self).parse(node_child)
        when 'extLst'
          @extension_list = ExtensionList.new(parent: self).parse(node_child)
        when 'tableColumns'
          @table_columns = TableColumns.new(parent: self).parse(node_child)
        when 'tableStyleInfo'
          @table_style_info = TableStyleInfo.new(parent: self).parse(node_child)
        end
      end
      self
    end
114105
def parse(node)
      node.xpath('*').each do |node_child|
        case node_child.name
        when 'shape'
          @type = :shape
          @data = OldDocxShape.new(parent: self).parse(node_child)
        when 'group'
          @type = :group
          @data = OldDocxGroup.new(parent: self).parse(node_child)
        when 'style'
          @style_number = node_child.attribute('val').value.to_i
        end
      end
      self
    end
916844
def parse(color_node)
      color_node.xpath('*').each do |color_node_child|
        case color_node_child.name
        when 'sysClr'
          @type = :system
          @value = color_node_child.attribute('val').value
          @color = Color.new(parent: self).parse_hex_string(color_node_child.attribute('lastClr').value.to_s) unless color_node_child.attribute('lastClr').nil?
        when 'srgbClr'
          @type = :rgb
          @color = Color.new(parent: self).parse_hex_string(color_node_child.attribute('val').value.to_s)
        end
      end
      self
    end
865753
def parse(node)
      node.xpath('*').each do |node_child|
        case node_child.name
        when 'alias'
          @alias = ValuedChild.new(:string, parent: self).parse(node_child)
        when 'tag'
          @tag = ValuedChild.new(:string, parent: self).parse(node_child)
        when 'lock'
          @lock = ValuedChild.new(:symbol, parent: self).parse(node_child)
        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
157810
def parse_xml(self, node):
        
        self._set_properties(node)
        self.background_color = node.get('backgroundcolor',
                                         self.background_color)

        # ***         do not change this load order!         *** #
        # ***    gid mapping errors will occur if changed    *** #
        for subnode in node.findall('layer'):
            self.add_layer(TiledTileLayer(self, subnode))

        for subnode in node.findall('imagelayer'):
            self.add_layer(TiledImageLayer(self, subnode))

        for subnode in node.findall('objectgroup'):
            self.add_layer(TiledObjectGroup(self, subnode))

        for subnode in node.findall('tileset'):
            self.add_tileset(TiledTileset(self, subnode))

        # "tile objects", objects with a GID, have need to have their attributes
        # set after the tileset is loaded, so this step must be performed last
        # also, this step is performed for objects to load their tiles.

        # tiled stores the origin of GID objects by the lower right corner
        # this is different for all other types, so i just adjust it here
        # so all types loaded with pytmx are uniform.

        # iterate through tile objects and handle the image
        for o in [o for o in self.objects if o.gid]:

            # gids might also have properties assigned to them
            # in that case, assign the gid properties to the object as well
            p = self.get_tile_properties_by_gid(o.gid)
            if p:
                for key in p:
                    o.properties.setdefault(key, p[key])

            if self.invert_y:
                o.y -= o.height

        self.reload_images()
        return self
710608
def parse(node)
      node.xpath('*').each do |node_child|
        case node_child.name
        when 'bgPr'
          @properties = BackgroundProperties.new(parent: self).parse(node_child)
        end
      end

      background_properties_node = node.xpath('p:bgPr').first
      if background_properties_node
        @shade_to_title = attribute_enabled?(background_properties_node, 'shadeToTitle')
        @fill = PresentationFill.new(parent: self).parse(background_properties_node)
      end
      self
    end
88183
def parse(node)
      node.attributes.each do |key, value|
        case key
        when 'fillcolor'
          @fill_color = Color.new(parent: self).parse_hex_string(value.value.delete('#'))
        when 'opacity'
          @opacity = value.value.to_f
        when 'strokecolor'
          @stroke_color = Color.new(parent: self).parse_hex_string(value.value.delete('#'))
        when 'strokeweight'
          @stroke_weight = value.value.to_f
        end
      end
      self
    end
679818
def parse(node)
      node.xpath('*').each do |node_child|
        case node_child.name
        when 'rPrDefault'
          @run_properties_default = RunPropertiesDefault.new(parent: self).parse(node_child)
        when 'pPrDefault'
          @paragraph_properties_default = ParagraphPropertiesDefault.new(parent: self).parse(node_child)
        end
      end
      self
    end