Parses <Text>

        @param node: Node containing the <Text> element
        @type node: xml.etree.Element
13097
def parse_text(self, node):
        

        if 'name' in node.lattrib:
            name = node.lattrib['name']
        else:
            self.raise_error('<Text> must specify a name.')

        description = node.lattrib.get('description', '')

        self.current_component_type.add_text(Text(name, description))
1227249
def parse(self, xmltext):
        
        
        xml = LEMSXMLNode(xe.XML(xmltext))

        if xml.ltag != 'lems' and xml.ltag != 'neuroml':
            raise ParseError('<Lems> expected as root element (or even <neuroml>), found: {0}'.format(xml.ltag))
        '''
        if xml.ltag == 'lems':
            if 'description' in xml.lattrib:
                self.description = xml.lattrib['description']
        '''

        self.process_nested_tags(xml)
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
295391
public function parseXml($node)
    {
        foreach ($node->childNodes as $item) {
            if ($item->nodeName != "#text") {
                $this->set( $item->nodeName, $item->nodeValue);
            }
        }

    }
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
198128
def parse_xml_node(self, node):
        '''

        '''
        self.name = node.getAttributeNS(RTS_NS, 'name')
        if node.hasAttributeNS(RTS_NS, 'data'):
            self.data = node.getAttributeNS(RTS_NS, 'data')
        else:
            self.data = ''
        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
247782
def parse_xml(self, node):
        
        self._set_properties(node)
        self.extend(TiledObject(self.parent, child)
                    for child in node.findall('object'))

        return self
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
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
25983
def parse(node)
      node.attributes.each do |key, value|
        case key
        when 'horizontal'
          @horizontal = value.value.to_sym
          @wrap_text = true if @horizontal == :justify
        when 'vertical'
          @vertical = value.value.to_sym
        when 'wrapText'
          @wrap_text = value.value.to_s == '1'
        when 'textRotation'
          @text_rotation = value.value.to_i
        end
      end
      self
    end
1289933
def parse(node)
      list = []
      node.xpath('*').each do |node_child|
        case node_child.name
        when 'AlternateContent'
          list << AlternateContent.new(parent: self).parse(node_child)
        end
      end
      list
    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
469380
def parse(node)
      node.xpath('*').each do |node_child|
        case node_child.name
        when 'pPr'
          @properties = ParagraphProperties.new(parent: self).parse(node_child)
        when 'fld'
          @text_field = TextField.new(parent: self).parse(node_child)
        when 'r'
          @runs << ParagraphRun.new(parent: self).parse(node_child)
        when 'AlternateContent'
          @alternate_content = AlternateContent.new(parent: self).parse(node_child)
        end
      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
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
111891
def parse(node)
      node.xpath('*').each do |node_child|
        case node_child.name
        when 'blip'
          @file_reference = FileReference.new(parent: self).parse(node_child)
        when 'tile'
          @tile = Tile.new(OOXMLCoordinates.parse(node_child, x_attr: 'tx', y_attr: 'ty'),
                           OOXMLCoordinates.parse(node_child, x_attr: 'sx', y_attr: 'sy'),
                           parent: self).parse(node_child)
        end
      end
      self
    end