My code is like this
var tariffdate = PriceSheet.children('TariffEffDate')[1].text;
Where I expect to get data inside TariffEffDate tag. But it gives me undefined instead.
I can Get <TariffEffDate>1999-01-01T00:00:00</TariffEffDate> as a result for code
console.log(PriceSheet.children('TariffEffDate')[1])
But when I add .text to get data inside this node it is giving me undefined.
Can anyone point out what I am doing wrong here?
.nodeValueinstead of.textIIRC.[1].firstChild.nodeValueinstead of[1].nodeValue. Perhaps that would fix it?