Get XML attribute on 2012 platform

Published 2014-10-27 | (Compatible with SDK 3.5,4.5,5.0,5.1 and 2012,2013,2014 models)

XML attributes referencing on different SmartTV platforms

For access data received through an XML response, parsing is employed, there is difference in accessing attribute in XML.

Accessing of attribute inside XML is possible by ”.”
Access is not possible by attribute inside XML.


Use getAttribute() operated in all the browser.

Source Files


The files needed for the sample application are here.

Bad example

var service = objPreview.service;

Good example

var service = objPreview.getAttribute('service');