JavaScript non-extracting XML parser