I would suggest that you change your Messages location into JSON. Reducing code liability into JSON.parse( xhrContent ) Making long term maintenance much better.
It would look like this
[
{ "show" : "true" },
{
"num" : 15,
"date" : "2015/04/11",
"text" : "YouTube is having some issues removing videos at the moment. Clicking remove *will* clear the video, however it may take some time to register and subsequently may show for a while after the page is refreshed. If you refresh the page a few times then YouTube should catch up and eventually not show the video.",
"ttl" : 7
}
]
Instead of this
<?xml version="1.0" encoding="utf-8"?>
<messages>
<show>true</show>
<message>
<num>15</num>
<date>11th Apr 2015</date>
<text>YouTube is having some issues removing videos at the moment. Clicking remove *will* clear the video, however it may take some time to register and subsequently may show for a while after the page is refreshed. If you refresh the page a few times then YouTube should catch up and eventually not show the video.</text>
<!-- Time to live of the message in days -->
<ttl>7</ttl>
</message>
</messages>
I would suggest that you change your Messages location into JSON. Reducing code liability into
JSON.parse( xhrContent )
Making long term maintenance much better.It would look like this
Instead of this