[Biopython] Pubmeddata XML parsing with Entrez .fetch and .read
Peter
biopython at maubp.freeserve.co.uk
Sun Jul 18 06:59:02 EDT 2010
On Sun, Jul 18, 2010 at 9:43 AM, Michiel de Hoon wrote:
>> 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?
I've not played with the code yet to see what you mean about the
tag attribute.
There is an inconsistency with DictionaryElement vs DictElement
(deliberate for space?) and StructureElement vs DictElement (typo?).
Peter
More information about the Biopython
mailing list