Re: XML file parsing with SAX

2005-04-23 Thread Willem Ligtenberg
I didn't make the XML file. And I don't like messing with other peoples data. So I just want my SAX parser to ignore it. I can't help if other people make it hard for me to read their xml file... On Sat, 23 Apr 2005 13:48:49 -0600, Uche Ogbuji wrote: > On Sat, 2005-04-23 at 1

XML file parsing with SAX

2005-04-23 Thread Willem Ligtenberg
I decided to use SAX to parse my xml file. But the parser crashes on: File "/usr/lib/python2.3/site-packages/_xmlplus/sax/handler.py", line 38, in fatalError raise exception xml.sax._exceptions.SAXParseException: NCBI_Entrezgene.dtd:8:0: error in processing external entity reference This i

Re: XML parsing per record

2005-04-22 Thread Willem Ligtenberg
+0200, Fredrik Lundh wrote: > Willem Ligtenberg wrote: > >> As I'm trying to write the code using cElementTree. >> I stumble across one problem. Sometimes there are multiple values to >> retrieve from one record for the same element. Like this: >> ATP-binding ca

Re: XML parsing per record

2005-04-22 Thread Willem Ligtenberg
By the way, I know about findall, but when I iterate thruogh it like: for x in function: print 'function', x I get: function function But ofcourse I want the information in there... On Fri, 22 Apr 2005 15:22:17 +0200, Willem Ligtenberg wrote: > As I'm trying to wr

Re: XML parsing per record

2005-04-22 Thread Willem Ligtenberg
st as well, so that I can store it in a list. Thanks in advance, Willem Ligtenberg On Fri, 22 Apr 2005 13:48:15 +0200, Willem Ligtenberg wrote: > This is all the info I need from the xml file: > ID -->320632 > > Name --> >

Re: XML parsing per record

2005-04-22 Thread Willem Ligtenberg
1 6 Some can happen more than once in a record. On Fri, 22 Apr 2005 02:41:46 -0400, William Park wrote: > Willem Ligtenberg <[EMAIL PROTECTED]> wrote: >> On Sun, 17 Apr 2005 02:16:04 +, William Park wrote: >> > Care to post more details? >&

Re: XML parsing per record

2005-04-21 Thread Willem Ligtenberg
Sorry I just decided that I want to use your solution, but I am wondering is cElemenTree in expat or is that something different? On Wed, 20 Apr 2005 08:03:00 -0400, Kent Johnson wrote: > Willem Ligtenberg wrote: >>>Willem Ligtenberg <[EMAIL PROTECTED]> wrote: >>>

Re: XML parsing per record

2005-04-21 Thread Willem Ligtenberg
d I might go for the cElementTree later on, if the ordinary SAX proves to slow... On Wed, 20 Apr 2005 08:03:00 -0400, Kent Johnson wrote: > Willem Ligtenberg wrote: >>>Willem Ligtenberg <[EMAIL PROTECTED]> wrote: >>> >>>>I want to parse a very large (2.4 g

Re: XML parsing per record

2005-04-20 Thread Willem Ligtenberg
On Sun, 17 Apr 2005 02:16:04 +, William Park wrote: > Willem Ligtenberg <[EMAIL PROTECTED]> wrote: >> I want to parse a very large (2.4 gig) XML file (bioinformatics >> ofcourse :)) But I have no clue how to do that. Most things I see read >> the entire xml file a

XML parsing per record

2005-04-16 Thread Willem Ligtenberg
e the information in another object. How should I do that? Thanks in advance, Willem Ligtenberg A total newbie to python by the way. -- http://mail.python.org/mailman/listinfo/python-list