Parses the ``node`` XML document and returns a reStructuredText formatted
    string.  Helper method for :func:`~exhale.parse.getBriefAndDetailedRST`.

    .. todo:: actually document this
557956
def convertDescriptionToRST(textRoot, node, soupTag, heading):
    '''
    
    '''
    if soupTag.para:
        children = soupTag.findChildren(recursive=False)
        for child in children:
            walk(textRoot, child, 0, None, "\n")
        contents = soupTag.get_text()

        if not heading:
            return contents

        start = textwrap.dedent('''
            {heading}
            {heading_mark}
        '''.format(
            heading=heading,
            heading_mark=utils.heading_mark(
                heading,
                configs.SUB_SECTION_HEADING_CHAR
            )
        ))
        return "{0}{1}".format(start, contents)
    else:
        return ""
850634
def parse_html(html: str, parser: FragmentParser = None) -> Node:
    
    parser = parser or FragmentParser()
    parser.feed(html)
    return parser.root
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
612041
def parseDoc(self, doc_str, format="xml"):
        
        self.parse(data=doc_str, format=format)
        self._ore_initialized = True
        return self
872368
function _getNodeText(node) {
    return node.sourceFile.text.substr(node.start, node.end - node.start);
}
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
238855
def parse_rst(text: str) -> docutils.nodes.document:
    """"""
    parser = docutils.parsers.rst.Parser()
    components = (docutils.parsers.rst.Parser,)
    settings = docutils.frontend.OptionParser(components=components).get_default_values()
    document = docutils.utils.new_document('<rst-doc>', settings=settings)
    parser.parse(text, document)
    return document
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)
852865
def get_node_text(self, node):
        
        text_children = [n.nodeValue for n in self.get_node_children(node)
                         if n.nodeType == xml.dom.Node.TEXT_NODE]
        if text_children:
            return u''.join(text_children)
        else:
            return None
1056265
def parse_owl_xml(url):
    
    res = download(url)
    owl = OWLParser(content=res.content)
    return owl
1219556
def parse(data)
      if !data.respond_to?(:read)
        data = StringIO.new(data || "")
      end

      if data.eof?
        {}
      else
        silence_warnings { require "rexml/document" } unless defined?(REXML::Document)
        doc = REXML::Document.new(data)

        if doc.root
          merge_element!({}, doc.root, XmlMini.depth)
        else
          raise REXML::ParseException,
            "The document #{doc.to_s.inspect} does not have a valid root"
        end
      end
    end
457446
def parseDoc(cur):
    
    ret = libxml2mod.xmlParseDoc(cur)
    if ret is None:raise parserError('xmlParseDoc() failed')
    return xmlDoc(_obj=ret)
618948
def parse(node)
      node.attributes.each do |key, value|
        case key
        when 'id'
          @file_reference = FileReference.new(parent: self).parse(node)
        when 'type'
          @stretching_type = case value.value
                             when 'frame'
                               :stretch
                             else
                               value.value.to_sym
                             end
        when 'title'
          @title = value.value.to_s
        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
1228438
def parse(node)
      node.attributes.each do |key, value|
        case key
        when 'leftFromText'
          @left = OoxmlSize.new(value.value.to_f)
        when 'rightFromText'
          @right = OoxmlSize.new(value.value.to_f)
        when 'topFromText'
          @top = OoxmlSize.new(value.value.to_f)
        when 'bottomFromText'
          @bottom = OoxmlSize.new(value.value.to_f)
        when 'tblpX'
          @position_x = OoxmlSize.new(value.value.to_f)
        when 'tblpY'
          @position_y = OoxmlSize.new(value.value.to_f)
        when 'vertAnchor'
          @vertical_anchor = value.value.to_sym
        when 'horzAnchor'
          @horizontal_anchor = value.value.to_sym
        when 'tblpXSpec'
          @horizontal_align_from_anchor = value.value.to_sym
        when 'tblpYSpec'
          @vertical_align_from_anchor = value.value.to_sym
        end
      end
      self
    end
1224385
def contextNode(self):
        
        ret = libxml2mod.xmlXPathGetContextNode(self._o)
        if ret is None:raise xpathError('xmlXPathGetContextNode() failed')
        __tmp = xmlNode(_obj=ret)
        return __tmp
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)