 True
                            #month = True
                            DBJournal.pub_date_month = subelem.text
                        elif subelem.tag == "Day":
                            pubdate = True
                            #day = True
                            DBJournal.pub_date_day = subelem.text

                    if pubdate == False:
                        print "No Pubdate set!"
                    else:
                        if not year:
                            try:
                                temp_year = DBJournal.medline_date[0:4]
                                DBJournal.pub_date_year = temp_year
                            except:
                                print _file, " not able to cast first 4 letters of medline_date ", temp_year 
                if elem.tag == "Title":
                    """ ToDo """
                    pass

                if elem.tag == "Journal":
                    if elem.find("Title"):
                        DBJournal.title = elem.find("Title").text
                    if elem.find("ISOAbbreviation"):
                        DBJournal.iso_abbreviation = elem.find("ISOAbbreviation").text

                if elem.tag == "ArticleTitle" or elem.tag == "BookTitle":
                    DBCitation.article_title = elem.text
                if elem.tag == "MedlinePgn":
                    DBCitation.medline_pgn = elem.text

                if elem.tag == "AuthorList":
                    DBCitation.article_author_list_comp_yn = elem.attrib["CompleteYN"]

                    DBCitation.authors = []
                    for author in elem:
                        DBAuthor = PubMedDB.Author()

                        if author.find("LastName"):
                            DBAuthor.last_name = author.find("LastName").text
                        # Forname is restricted to max 99 characters
                        if author.find("ForeName") and not len(author.find("ForeName").text) > 100:
                            DBAuthor.fore_name = author.find("ForeName").text
                        elif author.find("ForeName") and len(author.find("ForeName").text) > 100:
                            DBAuthor.fore_name = author.find("ForeName").text[0:100]
                        if author.find("Initials"):
                            DBAuthor.initials = author.find("Initials").text
                        if author.find("Suffix"):
                            DBAuthor.suffix = author.find("Suffix").text
                        if author.find("CollectiveName"):
                            DBAuthor.collective_name = author.find("CollectiveName").text

                        DBCitation.authors.append(DBAuthor)

                if elem.tag == "PersonalNameSubjectList":
                    DBCitation.personal_names = []
                    for pname in elem:
                        DBPersonalName = PubMedDB.PersonalName()

                        if pname.find("LastName"):
                            DBPersonalName.last_name = pname.find("LastName").text
                        if pname.find("ForeName"):
                            DBPersonalName.fore_name = pname.find("ForeName").text
                        if pname.find("Initials"):
                            DBPersonalName.initials = pname.find("Initials").text
                        if pname.find("Suffix"):
                            DBPersonalName.suffix = pname.find("Suffix").text

                        DBCitation.personal_names.append(DBPersonalName)


                if elem.tag == "InvestigatorList":
                    DBCitation.investigators = []
                    for investigator in elem:
                        DBInvestigator = PubMedDB.Investigator()

                        if investigator.find("LastName"):
                            DBInvestigator.last_name = investigator.find("LastName").text
                        if investigator.find("ForeName"):
                            DBInvestigator.fore_name = investigator.find("ForeName").text
                        if investigator.find("Initials"):
                            DBInvestigator.initials = investigator.find("Initials").text
                        if investigator.find("Suffix"):
                            DBInvestigator.suffix = investigator.find("Suffix").text
                        if investigator.find("Affiliation"):
                            DBInvestigator.investigator_affiliation = investigator.find("Affiliation").text

                        DBCitation.investigators.append(DBInvestigator)

                if elem.tag == "SpaceFlightMission":
                    DBSpaceFlight = PubMedDB.SpaceFlight()
                    DBSpaceFlight.space_flight_mission = elem.text
                    DBCitation.space_flights = [DBSpaceFlight]

                if elem.tag == "GeneralNote":
                    DBCitation.notes = []
                    for subelem in elem:
                        DBNote = PubMedDB.Note()
                        DBNote.general_note_owner = elem.attrib["Owner"]
                        DBNote.general_note = subelem.text
                        DBCitation.notes.append(DBNote)

                if elem.tag == "ChemicalList":
                    DBCitation.chemicals = []
                    for chemical in elem:
                        DBChemical = PubMedDB.Chemical()

                        if chemical.find("RegistryNumber"):
                            DBChemical.registry_number = chemical.find("RegistryNumber").text
                        if chemical.find("NameOfSubstance"):
                            DBChemical.name_of_substance = chemical.find("NameOfSubstance").text

                        DBCitation.chemicals.append(DBChemical)

                if elem.tag == "GeneSymbolList":
                    DBCitation.gene_symbols = []
                    for genes in elem:
                        DBGeneSymbol = PubMedDB.GeneSymbol()
                        if genes.text < 40:
                            DBGeneSymbol.gene_symbol = genes.text
                        else:
                            DBGeneSymbol.gene_symbol = genes.text[:36] + '...'
                        DBCitation.gene_symbols.append(DBGeneSymbol)

                if elem.tag == "CommentsCorrections":
                    DBCitation.comments = []
                    for ctype in ("ErratumIn", "CommentOn", "CommentIn", "ErratumFor", "PartialRetractionIn",
                                "PartialRetractionOf", "RepublishedFrom", "RepublishedIn", "RetractionOf",
                                "RetractionIn", "UpdateIn", "UpdateOf", "SummaryForPatientsIn",
                                "OriginalReportIn", "ReprintIn", "ReprintOf"):
                        DBComment = PubMedDB.Comment()
                        comment = elem.find(ctype)
                        if comment:
                            for subelem in comment:
                                if subelem.find("RefSource"):
                                    DBComment.ref_source = subelem.find("RefSource").text
                                if subelem.find("PMID"):
                                    DBComment.pmid = int(subelem.find("PMID").text)
                                if subelem.find("Note"):
                                    DBComment.note = subelem.find("Note").text
                                DBComment.type = ctype
                            DBCitation.comments.append(DBComment)

                if elem.tag == "MedlineJournalInfo":
                    DBJournalInfo = PubMedDB.JournalInfo()
                    if elem.find("NlmUniqueID"):
                        DBJournalInfo.nlm_unique_id = elem.find("NlmUniqueID").text
                    if elem.find("Country"):
                        DBJournalInfo.country = elem.find("Country").text
                    """#MedlineTA is just a name for the journal as an abbreviation
                    Abstract with PubMed-ID 21625393 has no MedlineTA attributebut it has to be set in PostgreSQL, that is why "unknown" is inserted instead. There is just a <MedlineTA/> tag and the same information is given in  </JournalIssue> <Title>Biotechnology and bioprocess engineering : BBE</Title>, but this is not (yet) read in this parser -> line 173:
                    """
                    if elem.find("MedlineTA") and elem.find("MedlineTA").text == None:
                        DBJournalInfo.medline_ta = "unknown"
                    elif elem.find("MedlineTA"):
                        DBJournalInfo.medline_ta = elem.find("MedlineTA").text
                    DBCitation.journal_infos = [DBJournalInfo]

                if elem.tag == "CitationSubset":
                    DBCitation.citation_subsets = []
                    for subelem in elem:
                        DBCitationSubset = CitationSubset(subelem.text)
                        DBCitation.citation_subsets.append(DBCitationSubset)

                if elem.tag == "MeshHeadingList":
                    DBCitation.meshheadings = []
                    for