{ "translatorID":"4c9dbe33-e64f-4536-a02f-f347fa1f187d", "translatorType":4, "label":"BioInfoBank", "creator":"Michael Berkowitz", "target":"http://lib.bioinfo.pl/", "minVersion":"1.0.0b4.r5", "maxVersion":"", "priority":100, "inRepository":true, "lastUpdated":"2008-04-03 19:45:00" } function detectWeb(doc, url) { return "multiple"; } function doWeb(doc, url) { var pmids = new Array(); var items = new Object(); var titles = doc.evaluate('//div[@class="css_pmid"]/div[@class="css_pmid_title"]/a', doc, null, XPathResult.ANY_TYPE, null); var title; while (title = titles.iterateNext()) { items[title.href] = Zotero.Utilities.trimInternal(title.textContent); } items = Zotero.selectItems(items); for (var i in items) { pmids.push(i.match(/pmid:(\d+)/)[1]); } var newUri = "http://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?db=PubMed&retmode=xml&rettype=citation&id="+pmids.join(","); Zotero.Utilities.HTTP.doGet(newUri, function(text) { // Remove xml parse instruction and doctype text = text.replace(/]*>/, "").replace(/<\?xml[^>]*\?>/, ""); var xml = new XML(text); for(var i=0; i