Arguments
- Name: tag, Type: str
- tag name
- Name: attrs, Type: 2D list
- [0] attribute name, [1] attribute value
Source
def handle_startendtag(self, tag, attrs):
node = pyNode(tag.lower())
if len(self._dom) != 0:
node.set_parent(self._dom[-1])
self._nodes.append(node)
for attr in attrs:
node.set_attr(attr[0], attr[1])