Try parsing as text/html
: the querySelector
doesn't work on an XML document because XML doesn't understand CSS classes.
var zDom = dp.parseFromString(zXml, "text/html");
Alternatively, you can use XML and querySelector, but be more explicit with your selector argument:
var divCite = zDom.querySelector("div[class=csl-entry]");
As for the nodeValue
, I'm not sure what you expect to see in that property of a document
object.