Extracts all parameters from the operation node, and return as an array.

 @param op_options [Hash] The operation options.
 @param node [Nokogiri::XML] The operation node.
 @return [Array] The parsed parameters.
775891
def extract_parameters(op_options, node)
      logger.debug "Operation node: #{node.inspect}"
      r = []
      op_options[:parameters].each do |p|
        logger.debug "  Looking for: tns:#{p.first.camelize_if_symbol(:lower)}"
        v = node.xpath("tns:#{p.first.camelize_if_symbol(:lower)}", namespaces).first
        if v.nil?
          # does nothing
        elsif p.last == Fixnum
          v = v.text.to_i
        elsif p.last == DateTime
          v = DateTime.parse(v.text) # TODO: add tests
        else
          v = v.text
        end
        logger.debug "    Found: #{v.inspect}"
        r << v
      end
      r
    end
1027319
def parse(node)
      @id = node.attribute('id').value.to_i
      parse_type(node)
      doc = parse_xml(OOXMLDocumentObject.path_to_folder + xml_path)
      doc.search(xpath_for_search).each do |footnote|
        next unless footnote.attribute('id').value.to_i == @id

        paragraph_number = 0
        footnote.xpath('w:p').each do |paragraph|
          @elements << DocumentStructure.default_paragraph_style.dup.parse(paragraph, paragraph_number, DocumentStructure.default_run_style, parent: self)
          paragraph_number += 1
        end
      end
      self
    end
1038802
def parse_opml_bytes(data: bytes) -> OPML:
    """"""
    root = parse_xml(BytesIO(data)).getroot()
    return _parse_opml(root)
669430
def _set_op(self, node):
        
        select_block = str(node.attributes)
        from_block = '({left} {operator} ALL {right}) AS {name}'.format(
            left=self.translate(node.left).to_sql(),
            right=self.translate(node.right).to_sql(),
            operator=self._get_sql_operator(node), name=self._get_temp_name(node))
        return self.query(select_block=select_block, from_block=from_block)
418111
def enumerate_params_by_node(node)
      attrs = enumerate_attrs_by_node(node)
      Set.new(attrs.select { |a| @param_set.include?(a) })
    end
1323182
def parse(node)
      node.xpath('*').each do |node_child|
        case node_child.name
        when 'accPr'
          node_child.xpath('*').each do |node_child_child|
            case node_child_child.name
            when 'chr'
              @symbol = node_child_child.attribute('val').value
            end
          end
        end
      end
      @element = DocxFormula.new(parent: self).parse(node)
      self
    end
819047
def parse(node)
      @margins = ParagraphMargins.new(OoxmlSize.new(0.127, :centimeter),
                                      OoxmlSize.new(0.127, :centimeter),
                                      OoxmlSize.new(0.254, :centimeter),
                                      OoxmlSize.new(0.254, :centimeter)).parse(node)
      node.attributes.each do |key, value|
        case key
        when 'wrap'
          @wrap = value.value.to_sym
        when 'anchor'
          @anchor = value_to_symbol(value)
        when 'vert'
          @vertical = value_to_symbol(value)
        when 'numCol'
          @number_columns = value.value.to_i
        when 'spcCol'
          @space_columns = OoxmlSize.new(value.value.to_f, :emu)
        end
      end
      node.xpath('*').each do |node_child|
        case node_child.name
        when 'prstTxWarp'
          @preset_text_warp = PresetTextWarp.new(parent: self).parse(node_child)
        end
      end
      self
    end
411602
def _parse_input_node(cls, node):
        
        data = {}
        child = node.getchildren()
        if not child and node.get('name'):
            val = node.text
        elif child:  # if tag = "{http://activiti.org/bpmn}script" then data_typ = 'script'
            data_typ = child[0].tag.split('}')[1]
            val = getattr(cls, '_parse_%s' % data_typ)(child[0])
        data[node.get('name')] = val
        return data
1109923
function collectParameterValues(node) {
    switch (node && node.type) {
        case 'Identifier':
            return [node.name]
        case 'ObjectPattern':
            return _.flatMap(node.properties, prop => collectParameterValues(prop.value))
        case 'ArrayPattern':
            return _.flatMap(node.elements, collectParameterValues)
        default:
            return []
    }
}
1373146
def parse(node)
      return nil if node.attribute('val').value == 'nil'

      node.attributes.each do |key, value|
        case key
        when 'val'
          @val = value.value.to_sym
        when 'sz'
          @size = OoxmlSize.new(value.value.to_f, :one_eighth_point)
        when 'space'
          @space = OoxmlSize.new(value.value.to_f, :point)
        when 'color'
          @color = value.value.to_s
          @color = Color.new(parent: self).parse_hex_string(@color) if @color != 'auto'
        when 'shadow'
          @shadow = value.value
        end
      end
      self
    end
692049
def parse(node)
      node.attributes.each do |key, value|
        case key
        when 'dur'
          @duration = value.value
        when 'restart'
          @restart = value.value
        when 'id'
          @id = value.value
        end
      end

      node.xpath('*').each do |node_child|
        case node_child.name
        when 'stCondLst'
          @start_conditions = ConditionList.new(parent: self).parse(node_child)
        when 'endCondLst'
          @end_conditions = ConditionList.new(parent: self).parse(node_child)
        when 'childTnLst'
          @children = TimeNode.parse_list(node_child)
        end
      end
      self
    end
121073
def complete_operator(node)
      definition.operator_by_field_name(node.value).map { |o| o.end_with?(' ') ? o : "#{o} " }
    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
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
154184
def parse(node)
      node.attributes.each do |key, value|
        case key
        when 'ref'
          @ref = Coordinates.parser_coordinates_range(value.value)
        end
      end

      node.xpath('*').each do |node_child|
        case node_child.name
        when 'filterColumn'
          @filter_column = FilterColumn.new(parent: self).parse(node_child)
        end
      end
      self
    end
175338
function getOperands(node, parentOp) {
  // We can only recurse on operations of type op.
  // If the node is not an operator node or of the right operation type,
  // we can't break up or flatten this tree any further, so we return just
  // the current node, and recurse on it to flatten its ops.
  if (!Node.Type.isOperator(node)) {
    return [flattenOperands(node)];
  }
  switch (node.op) {
  // division is part of flattening multiplication
  case '*':
  case '/':
    if (parentOp !== '*') {
      return [flattenOperands(node)];
    }
    break;
  case '+':
  case '-':
    if (parentOp !== '+') {
      return [flattenOperands(node)];
    }
    break;
  default:
    return [flattenOperands(node)];
  }
  if (Node.PolynomialTerm.isPolynomialTerm(node, true)) {
    node.args.forEach((arg, i) => {
      node.args[i] = flattenOperands(node.args[i]);
    });
    return [node];
  }

  // If we're flattening over *, check for a polynomial term (ie a
  // coefficient multiplied by a symbol such as 2x^2 or 3y)
  // This is true if there's an implicit multiplication and the right operand
  // is a symbol or a symbol to an exponent.
  else if (parentOp === '*' && isPolynomialTermMultiplication(node)) {
    return maybeFlattenPolynomialTerm(node);
  }
  else if (parentOp === '*' && node.op === '/') {
    return flattenDivision(node);
  }
  else if (node.op === '-') {
    // this operation will become addition e.g. 2 - 3 -> 2 + -(-3)
    const secondOperand = node.args[1];
    const negativeSecondOperand = Negative.negate(secondOperand, true);
    const operands = [
      getOperands(node.args[0], parentOp),
      getOperands(negativeSecondOperand, parentOp)
    ];
    return [].concat.apply([], operands);
  }
  else {
    const operands = [];
    node.args.forEach((child) => {
      // This will make an array of arrays
      operands.push(getOperands(child, parentOp));
    });
    return [].concat.apply([], operands);
  }
}
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