nit: in cases like this, I think it makes sense to use something like `var allData = doc.getElementsByTagName('pre')` but we can take this as well.