"DukeOfMarshall" wrote:
So here's a follow up. Why does this not work when simply printing to the debugger
print "Image => "+rsp.foo[0]@att.gettext()
But this DOES work when printing to debugger
print "Image => "+rsp.foo[0]@att.tostr()
But neither work when setting the attribute
o.SDPosterUrl = rsp.foo[0]@att.gettext()
o.HDPosterUrl = rsp.foo[0]@att.tostr()
Instead I have to do this
hd_image = rsp.foo[0]@att
o.HDPosterUrl = hd_image
What in the world?
The @ shortcut returns a string, not an roXmlElement. Calling .toStr() is redundant in this case. This should work just fine:
o.SDPosterUrl = rsp.foo[0]@att
o.HDPosterUrl = rsp.foo[0]@att