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)
| 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`.""" |
nothing calls this directly
no test coverage detected