Javascript: Prototype Pattern (xmlencode, convert to ISO date, json object length, create object from sharepoint responseXML)