Retrieve DOM attributes via Attr Nodes to fix null handling.