Revert change from getTextContent to getNodeValue, as it returns null for Element nodes