DOMDocument getNodeValue() returns null (contains an output escaped string) DOMDocument getNodeValue() returns null (contains an output escaped string) xml xml

DOMDocument getNodeValue() returns null (contains an output escaped string)


You want getTextContent() rather than getNodeValue() - the latter always returns null for element nodes.


Instead of

rows[i].getNodeValue()

use

rows[i].getNodeValue().getChildNodes().item(0).getNodeValue()