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

Method parse_Element

Utilities/GenerateDocs/doxy2swig.py:155–172  ·  view source on GitHub ↗

Parse an `ELEMENT_NODE`. This calls specific `do_ ` handers for different elements. If no handler is available the `generic_parse` method is called. All tagNames specified in `self.ignores` are simply ignored.

(self, node)

Source from the content-addressed store, hash-verified

153 self.add_text(txt)
154
155 def parse_Element(self, node):
156 """Parse an `ELEMENT_NODE`. This calls specific
157 `do_<tagName>` handers for different elements. If no handler
158 is available the `generic_parse` method is called. All
159 tagNames specified in `self.ignores` are simply ignored.
160
161 """
162 name = node.tagName
163 ignores = self.ignores
164 if name in ignores:
165 return
166 attr = "do_%s" % name
167 if hasattr(self, attr):
168 handlerMethod = getattr(self, attr)
169 handlerMethod(node)
170 else:
171 self.generic_parse(node)
172 # if name not in self.generics: self.generics.append(name)
173
174 def add_text(self, value):
175 """Adds text corresponding to `value` into `self.pieces`."""

Callers

nothing calls this directly

Calls 1

generic_parseMethod · 0.95

Tested by

no test coverage detected