Probably worth also validating that they are of the expected type:

```python
    for row in rows:
        assert isinstance(row, minidom.Element)
```