(self, node, ret_type="list")
| 53 | return content |
| 54 | |
| 55 | def parseNode(self, node, ret_type="list"): |
| 56 | if ret_type == "dict": |
| 57 | childNodes = {} |
| 58 | else: |
| 59 | childNodes = [] |
| 60 | child = node.firstChild() |
| 61 | while True: |
| 62 | n = child.toElement() |
| 63 | if n.isNull(): |
| 64 | break |
| 65 | else: |
| 66 | if ret_type == "dict": |
| 67 | childNodes[str(n.tagName())] = n |
| 68 | else: |
| 69 | childNodes.append(n) |
| 70 | child = child.nextSibling() |
| 71 | return childNodes |
no test coverage detected