Parse an Object from ElementTree xml node

        :param node: ElementTree xml node
        :return: self
421097
def parse_xml(self, node):
        

        def read_points(text):
            """parse a text string of float tuples and return [(x,...),...]
            """
            return tuple(tuple(map(float, i.split(','))) for i in text.split())

        self._set_properties(node)

        # correctly handle "tile objects" (object with gid set)
        if self.gid:
            self.gid = self.parent.register_gid(self.gid)

        points = None
        polygon = node.find('polygon')
        if polygon is not None:
            points = read_points(polygon.get('points'))
            self.closed = True

        polyline = node.find('polyline')
        if polyline is not None:
            points = read_points(polyline.get('points'))
            self.closed = False

        if points:
            x1 = x2 = y1 = y2 = 0
            for x, y in points:
                if x < x1: x1 = x
                if x > x2: x2 = x
                if y < y1: y1 = y
                if y > y2: y2 = y
            self.width = abs(x1) + abs(x2)
            self.height = abs(y1) + abs(y2)
            self.points = tuple(
                [(i[0] + self.x, i[1] + self.y) for i in points])

        return self
527014
def parse(node)
      node.xpath('*').each do |node_child|
        case node_child.name
        when 'shape'
          element = OldDocxGroupElement.new(:shape)
          element.object = OldDocxShape.new(parent: self).parse(node_child)
          @elements << element
        when 'wrap'
          @properties.wrap = node_child.attribute('type').value.to_sym unless node_child.attribute('type').nil?
        when 'group'
          @elements << OldDocxGroup.new(parent: self).parse(node_child)
        end
      end
      self
    end
219245
def parse_xml_node(self, node):
        '''

        '''
        super(Preceding, self).parse_xml_node(node)
        p_nodes = node.getElementsByTagNameNS(RTS_NS, 'Preceding')
        if p_nodes.length != 1:
            raise InvalidParticipantNodeError
        p_node = p_nodes[0]
        if p_node.hasAttributeNS(RTS_NS, 'timeout'):
            self.timeout = int(p_node.getAttributeNS(RTS_NS, 'timeout'))
        else:
            self.timeout = 0
        if p_node.hasAttributeNS(RTS_NS, 'sendingTiming'):
            self.sending_timing = p_node.getAttributeNS(RTS_NS, 'sendingTiming')
        else:
            self.sending_timing = 'ASYNC'
        self._preceding_components = []
        for c in p_node.getElementsByTagNameNS(RTS_NS, 'PrecedingComponents'):
            self._preceding_components.append(TargetExecutionContext().parse_xml_node(c))
        return self
783371
function parse (node, self) {
  let block = false

  if (node.nodeType === 3) {
    let delimiters = self.templateDelimiters

    if (delimiters) {
      let tokens = parseTemplate(node.data, delimiters)

      if (tokens.length) {
        if (!(tokens.length === 1 && tokens[0].type === 0)) {
          tokens.forEach((token, i) => {
            let text = document.createTextNode(token.value)
            node.parentNode.insertBefore(text, node)

            if (token.type === 1) {
              self.buildBinding(TextBinding, text, null, token.value)
            }
          })

          node.parentNode.removeChild(node)
        }
      }
    }
  } else if (node.nodeType === 1) {
    block = self.traverse(node)
  }

  if (!block) {
    Array.prototype.slice.call(node.childNodes).forEach(function (node) { parse(node, self) })
  }
}
802859
def parse_xml_node(self, node):
        '''

        '''
        super(TargetPort, self).parse_xml_node(node)
        self.port_name = node.getAttributeNS(RTS_NS, 'portName')
        return self
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
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
1327330
def parse_xml_node(self, node):
        '''

        '''
        super(TargetExecutionContext, self).parse_xml_node(node)
        if node.hasAttributeNS(RTS_NS, 'id'):
            self.id = node.getAttributeNS(RTS_NS, 'id')
        else:
            self.id = ''
        return self
1109028
def parse(node)
      case node.name
      when 'moveTo'
        @type = :move
      when 'lnTo'
        @type = :line
      when 'arcTo'
        @type = :arc
      when 'cubicBezTo'
        @type = :cubic_bezier
      when 'quadBezTo'
        @type = :quadratic_bezier
      when 'close'
        @type = :close
      end

      node.xpath('*').each do |node_child|
        case node_child.name
        when 'pt'
          @points << OOXMLCoordinates.parse(node_child)
        end
      end
      self
    end
705568
def parse(node)
      node.xpath('*').each do |nary_child_node|
        case nary_child_node.name
        when 'sub'
          @bottom_value = DocxFormula.new(parent: self).parse(nary_child_node)
        when 'sup'
          @top_value = DocxFormula.new(parent: self).parse(nary_child_node)
        when 'naryPr'
          @properties = NaryProperties.new(parent: self).parse(nary_child_node)
        end
      end
      self
    end
839477
def parse(node)
      node.xpath('*').each do |node_child|
        case node_child.name
        when 'p'
          @elements << DocxParagraph.new(parent: self).parse(node_child)
        when 'r'
          @elements << ParagraphRun.new(parent: self).parse(node_child)
        when 'tbl'
          @elements << Table.new(parent: self).parse(node_child)
        end
      end
      self
    end
1186926
def _parse_tree(self, node):
        
        self.kind = node.tag
        if 'compare' in node.attrib:
            self.compare = node.attrib['compare']
        if 'version' in node.attrib:
            self.version = node.attrib['version']
        self.value = node.text
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
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
1287932
def parse(node)
      node.xpath('*').each do |node_child|
        case node_child.name
        when 'style'
          @style_number = node_child.attribute('val').value.to_i
        when 'oleObject'
          @ole_object = OleObject.new(parent: self).parse(node_child)
        end
      end
      self
    end
579251
def parse(node)
      node.xpath('*').each do |node_child|
        case node_child.name
        when 't'
          @text = node_child.text
        when 'r'
          @run = ParagraphRun.new(parent: self).parse(node_child)
        end
      end
      self
    end
1323003
def parse_xml_node(self, node):
        '''

        '''
        if node.getElementsByTagNameNS(RTS_NS, 'Participant').length != 1:
            raise InvalidParticipantNodeError
        self.target_component = TargetComponent().parse_xml_node(\
                node.getElementsByTagNameNS(RTS_NS, 'Participant')[0])
        return self