[Biopython] Pubmeddata XML parsing with Entrez .fetch and .read

Michiel de Hoon mjldehoon at yahoo.com
Sun Jul 18 04:43:45 EDT 2010


> Maybe you can keep the basic data type repr if there are no
> attributes, and only expand it if needed? It would be inconsistent
> but would keep the total string length down.
> 
Done.

The code can be further simplified if we drop the .tag attribute on each XML element. If we drop .tag, then all elements that do not have attributes (which are most of them) can be presented as a simple list, dictionary, string, and so on instead of a ListElement, DictionaryElement, StringElement. Then the *Element classes are used only in those cases where there actually are attributes. Or is that too inconsistent?

--Michiel.


      


More information about the Biopython mailing list