XML parsing per record

William Park opengeometry at yahoo.ca
Fri Apr 22 11:16:16 EDT 2005


Willem Ligtenberg <WLigtenberg at gmail.com> wrote:
...
> ID --> 	<Gene-track_geneid>320632</Gene-track_geneid>
...
> Product-type --> <Entrezgene_type value="protein-coding">6</Entrezgene_type>
...
> EC --> <Prot-ref_ec>
>         <Prot-ref_ec_E>1.5.1.5</Prot-ref_ec_E>
>         <Prot-ref_ec_E>3.5.4.9</Prot-ref_ec_E>
>       </Prot-ref_ec>
...
>
> Some can happen more than once in a record.

Since all your data are contained in unique tags on individual lines,
you can tackle this so many different ways.  Okey, that's your input
format.  What is your output format?

-- 
William Park <opengeometry at yahoo.ca>, Toronto, Canada
Slackware Linux -- because it works.



More information about the Python-list mailing list