Hi
I am trying to extract the value of the credits node from an XML string as follows
HTTP<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE response PUBLIC
"-//textmarketer.biz//DTD Web Services REST 1.6//EN"
"http://api.textmarketer.co.uk/services/rest/DTD/credits_get.dtd">
<response processed_date="2015-09-24T14:45:41+01:00">
<credits>2390</credits>
</response>
I want to return the credits value and I am getting no response using
var XML2 = plugins.XmlReader.readXmlDocumentFromString('The string here');
application.output(XML2[0].getName()); //returns the word 'response' which is expected
var child = XML2[0].getChildNodes()
application.output(child) //outputs []
I was expecting to get <credits> and wanting to get 2390
Anyone with any XML expertise can you point me in the right direction ?
many thanks
Gordon McLean