I want to parse XML response obtained from bioproject DB using efetch module in Biopython.

Here is my code:

```py
from Bio import Entrez
Entrez.email = "myemail@company.org"
handle = Entrez.efetch(db="bioproject", id="55465", rettype='gb',retmode="xml")
records = Entrez.parse(handle) 
for record in records: 
      print record
```

but this gives the following error:

```py
Bio.Entrez.Parser.ValidationError: Failed to find tag 'RecordSet' in the DTD. To skip all tags that are not represented in the DTD, please call Bio.Entrez.read or Bio.Entrez.parse with validate=False.
```

instead if I try this, it works but it gives the XML lines as it is (no parsing)

```py
handle = Entrez.efetch(db="bioproject", id="55465", rettype='gb',retmode="xml") 
readlines = handle.readlines()
for line in readlines:
    print line
```

Can anyone please guide as what is the right way to parse the XML response in this case?
This seems to be a problem with the Bioproject database not having a DTD: http://lists.open-bio.org/pipermail/biopython/2015-May/015632.html

That thread has a work-around, but you might also want to try the development version of Biopython (https://github.com/biopython/biopython) to see if the new work Peter mentions will "just work".

**EDIT**

I'm not sure it will make any difference, but 'gb' is not a rettype available for the Bioproject database:

http://www.ncbi.nlm.nih.gov/books/NBK25499/table/chapter4.T._valid_values_of__retmode_and/?report=objectonly