Re: [Tutor] how to extract text by specifying an element using ElementTree

2005-12-21 Thread Danny Yoo
On Wed, 21 Dec 2005, ps python wrote: Dear drs. Yoo and johnson, Thank you very much for your help. I successully parsed my GO annotation from all 16,000 files. thanks again for your kind help I'm glad to hear that it's working for you now. Just as a clarification: I'm not a doctor.

Re: [Tutor] how to extract text by specifying an element using ElementTree

2005-12-21 Thread Kent Johnson
Danny Yoo wrote: On Wed, 21 Dec 2005, ps python wrote: Dear drs. Yoo and johnson, Thank you very much for your help. I successully parsed my GO annotation from all 16,000 files. thanks again for your kind help I'm glad to hear that it's working for you now. Just as a clarification:

Re: [Tutor] how to extract text by specifying an element using ElementTree

2005-12-20 Thread ps python
Dear Drs. Johnson and Yoo , for the last 1 week I have been working on parsing the elements from a bunch of XML files following your suggestions. until now I have been unsuccessul. I have no clue why i am failing. I have ~16K XML files. this data obtained from johns hopkins university (of

Re: [Tutor] how to extract text by specifying an element using ElementTree

2005-12-20 Thread Kent Johnson
ps python wrote: Dear Drs. Johnson and Yoo , for the last 1 week I have been working on parsing the elements from a bunch of XML files following your suggestions. from elementtree.ElementTree import ElementTree mydata = ElementTree(file='4.xml') for process in

Re: [Tutor] how to extract text by specifying an element using ElementTree

2005-12-20 Thread ps python
Dear drs. Yoo and johnson, Thank you very much for your help. I successully parsed my GO annotation from all 16,000 files. thanks again for your kind help --- Danny Yoo [EMAIL PROTECTED] wrote: for m in mydata.findall('//functions'): print m.get('molecular_class').text for m

Re: [Tutor] how to extract text by specifying an element using ElementTree

2005-12-09 Thread Srinivas Iyyer
Hi group, I just have another question in parsin XML files. I found it very easy to parse XML files with kent and danny's help. I realized that all my XML files have '\t' and '\n' and whitespace. these extra features are making to extract the text data from the xml files very difficult. I

Re: [Tutor] how to extract text by specifying an element using ElementTree

2005-12-09 Thread Kent Johnson
Srinivas Iyyer wrote: Hi group, I just have another question in parsin XML files. I found it very easy to parse XML files with kent and danny's help. I realized that all my XML files have '\t' and '\n' and whitespace. these extra features are making to extract the text data from the

[Tutor] how to extract text by specifying an element using ElementTree

2005-12-08 Thread ps python
Hi, using ElementTree, how can I extract text of a particular element, or a child node. For example: biological_processess biological_process Signal transduction /biological_process biological_process

[Tutor] how to extract text by specifying an element using ElementTree

2005-12-08 Thread ps python
Hi, using ElementTree, how can I extract text of a particular element, or a child node. For example: biological_processess biological_process Signal transduction /biological_process biological_process Energy process /biological_process /biological_processess

Re: [Tutor] how to extract text by specifying an element using ElementTree

2005-12-08 Thread Danny Yoo
For example: biological_processess biological_process Signal transduction /biological_process biological_process Energy process /biological_process /biological_processess I looked at some tutorials (eg. Ogbuji). Those examples described to extract

Re: [Tutor] how to extract text by specifying an element using ElementTree

2005-12-08 Thread Kent Johnson
ps python wrote: Hi, using ElementTree, how can I extract text of a particular element, or a child node. For example: biological_processess biological_process Signal transduction /biological_process biological_process Energy process

Re: [Tutor] how to extract text by specifying an element using ElementTree

2005-12-08 Thread Kent Johnson
ps python wrote: Kent and Dany, Thanks for your replies. Here fromstring() assuming that the input is in a kind of text format. Right, that is for the sake of a simple example. what should be the case when I am reading files directly. I am using the following : from