hi there –
I have an xml feed that I want to printout. I can get all the other nodes – description, pubDate, title, but not category – there are multple categories and I am interested only in populated ones.
I do not control the feed – only consume it.
XML -typical <item>
<item><title type=”text”>Canadian Insurance Companies Effective Tax Rate Study</title><author><name>Mary
O'Connor</name></author><link>
06t12:00:00z</updated><description>An effective tax rate study (ETR) compares the components of the ETR and deferred tax items of several
companies. The attached ETR compares Canadian insurers </description><pubDate>2013-06-28t12:00:00z</pubDate>
<category>Insurance</category>
<category>Client Insight</category>
<category>Market Insight</category>
<category></category>
<category></category>
<category></category>
<category></category>
<category>Canada</category>
<category></category>
<category>Global Research and Analysis</category>
<category>2013-07-06t12:00:00z</category>
<category>2013-06-28t12:00:00z</category>
<category></category>
<category>2013-06-28t12:00:00z</category>
<category></category></item>
I am using this to output:
if(items.getElementsByTagName(‘item’)[i].getElementsByTagName(‘link’).length==1)
link[i]=items.getElementsByTagName(‘item’)[i].getElementsByTagName(‘link’)[0];
Any ideas??