"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/c2b/pubmedXml.cpp" between
cb2bib-1.9.9.tar.gz and cb2bib-2.0.0.tar.gz

About: cb2Bib is a multiplatform application for rapidly extracting unformatted, or unstandardized bibliographic references from email alerts, journal Web pages, and PDF files.

pubmedXml.cpp  (cb2bib-1.9.9):pubmedXml.cpp  (cb2bib-2.0.0)
/*************************************************************************** /***************************************************************************
* Copyright (C) 2004-2018 by Pere Constans * Copyright (C) 2004-2019 by Pere Constans
* constans@molspaces.com * constans@molspaces.com
* cb2Bib version 1.9.9. Licensed under the GNU GPL version 3. * cb2Bib version 2.0.0. Licensed under the GNU GPL version 3.
* See the LICENSE file that comes with this distribution. * See the LICENSE file that comes with this distribution.
***************************************************************************/ ***************************************************************************/
#include "pubmedXml.h" #include "pubmedXml.h"
#include "cb2bib_utilities.h" #include "cb2bib_utilities.h"
pubmedXml::pubmedXml(const QString& xml) : QXmlStreamReader() pubmedXml::pubmedXml(const QString& xml) : QXmlStreamReader()
{ {
_reference.clearReference(); _reference.clearReference();
addData(xml); addData(xml);
skipping to change at line 47 skipping to change at line 47
_reference["pages"] = text().toString().remove(QRegExp("\\,[\\s\\d]+ ")); // Cases "11-5, 25" _reference["pages"] = text().toString().remove(QRegExp("\\,[\\s\\d]+ ")); // Cases "11-5, 25"
} }
else if (name() == "PMID") else if (name() == "PMID")
{ {
readNext(); readNext();
_reference["url"] = c2bUtils::pubmedUrl.arg(text().toString()); _reference["url"] = c2bUtils::pubmedUrl.arg(text().toString());
} }
else if (name() == "ArticleId") else if (name() == "ArticleId")
{ {
if (attributes().count() > 0) if (attributes().count() > 0)
if (attributes().first().value().toString() == "doi") if (attributes().at(0).value().toString() == "doi")
readField("doi"); readField("doi");
} }
} }
void pubmedXml::readField(const QString& field) void pubmedXml::readField(const QString& field)
{ {
_reference[field] = readElementText(QXmlStreamReader::IncludeChildElements); _reference[field] = readElementText(QXmlStreamReader::IncludeChildElements);
} }
void pubmedXml::readAuthors() void pubmedXml::readAuthors()
 End of changes. 3 change blocks. 
3 lines changed or deleted 3 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)