MCPcopy Create free account
hub / github.com/SimpleITK/SimpleITK / parse

Function parse

Utilities/Maintenance/JIRAHTMLReleaseNoteToWiki.py:83–93  ·  view source on GitHub ↗

Core reclusive method for depth-first traversal without state

(node)

Source from the content-addressed store, hash-verified

81
82
83def parse(node):
84 """Core reclusive method for depth-first traversal without state"""
85 s = ""
86 for child in node.childNodes:
87 if child.nodeType == xml.dom.Node.TEXT_NODE:
88 s += do_text(child)
89 elif child.nodeType == xml.dom.Node.DOCUMENT_TYPE_NODE:
90 s += parse_Document(child)
91 elif child.nodeType == xml.dom.Node.ELEMENT_NODE:
92 s += parse_Element(child)
93 return s
94
95
96def html_fragment_to_wiki(html_fragment):

Callers 6

do_liFunction · 0.85
do_aFunction · 0.85
do_hFunction · 0.85
parse_ElementFunction · 0.85
parse_DocumentFunction · 0.85
html_fragment_to_wikiFunction · 0.85

Calls 3

do_textFunction · 0.85
parse_DocumentFunction · 0.85
parse_ElementFunction · 0.85

Tested by

no test coverage detected