View Single Post
Old 12-13-2012, 04:40 PM   PM User | #8
AndrewGSW
Senior Coder

 
Join Date: Apr 2011
Location: London, England
Posts: 2,120
Thanks: 15
Thanked 354 Times in 353 Posts
AndrewGSW will become famous soon enough
Something like:

Code:
var i = 0, d, xmlBodyN, xmlCreate, newCreate, jsDate;

while (d = document.getElementById("Body" + i)) {
    xmlBodyN = xmlDoc.getElementsByTagName("Body")[i];
    if (xmlBodyN) {
        d.innerHTML = xmlBodyN.childNodes[0].nodeValue;
        xmlCreate = xmlDoc.getElementsByTagName("Created")[i];
        if (!xmlCreate) continue;
        newCreate = document.createElement('span');
        newCreate.id = "Timestamp" + (i++);
        d.parent.insertBefore(newCreate, d);

        xmlCreate = xmlCreate.childNodes[0].nodeValue;
        jsDate = new Date(xmlCreate);
        jsDate = jsDate.format('mmmm dxx, h:nnap');
        newCreate.innerHTML = jsDate;
    } else {
        break;
    }
}
but if this code makes no sense, and/or you are unable to incorporate it, then you may need to employ someone to do this for you.

Change "Timestamp" to "Created" if you want the new spans named "Created0", "Created1", etc..
__________________
"I'm here to save your life. But if I'm going to do that, I'll need total uninanonynymity." Me Myself & Irene.
Validate your HTML and CSS

Last edited by AndrewGSW; 12-13-2012 at 04:51 PM.. Reason: d
AndrewGSW is offline   Reply With Quote