Doran, Harold wrote:
>for statentityref in statentityref.findall('statentityref'):
In this line, you assign new values to the name "statentityref" in each
iteration of the loop.
> for statval in statentityref.findall('statval'):
> print >> f, statentityref.attrib['id'], '\t',
309
> 13963 1.00ScorePtAdjBiserial 0.452588
>
> I think this may be what Cliff meant by name collusion. That
> is, the number 13963 comes from an attribute ['id'] in
> statentityref. But also, 0.000 and 1.0 are also from the id
> attribute in s
-Original Message-
> From: Stefan Behnel [mailto:[EMAIL PROTECTED]
> Sent: Monday, April 07, 2008 8:32 AM
> To: Doran, Harold
> Cc: J. Cliff Dyer; xml-sig@python.org
> Subject: Re: [XML-SIG] Learning to use elementtree
>
> Hi,
>
> Doran, Harold wrote:
> > Wel
you should read the previous post again. You are nesting three loops
here where two would do what you want.
Stefan
>> -Original Message-----
>> From: J. Cliff Dyer [mailto:[EMAIL PROTECTED]
>> Sent: Wednesday, April 02, 2008 3:36 PM
>> To: Doran, Harold
>> Cc: x
[mailto:[EMAIL PROTECTED]
> Sent: Wednesday, April 02, 2008 3:36 PM
> To: Doran, Harold
> Cc: xml-sig@python.org
> Subject: Re: [XML-SIG] Learning to use elementtree
>
> On Wed, 2008-04-02 at 15:28 -0400, Doran, Harold wrote:
> > Indeed, navigating the xml is tough (f
On Wed, 2008-04-02 at 15:28 -0400, Doran, Harold wrote:
> Indeed, navigating the xml is tough (for me). I have been able to get
> the following to work. I put in "Sub Element" to indicate the new
> section of data. But, from looking at the text output, one doesn't know
> which item these sub elemen
.attrib['value']
f.close()
> -Original Message-
> From: J. Cliff Dyer [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, April 02, 2008 2:47 PM
> To: Doran, Harold
> Cc: xml-sig@python.org
> Subject: Re: [XML-SIG] Learning to use elementtree
>
> On Wed, 2008
On Wed, 2008-04-02 at 14:39 -0400, Doran, Harold wrote:
> Cliff
>
> This was very helpful, thank you. I have modified the code accordingly
> and all is working as expected. I want to make one modification, but
> seem to be having some problems with generalization of the code.
>
> The current prog
On Tue, 2008-04-01 at 08:35 -0400, Doran, Harold wrote:
> David et al:
>
> Attached is a sample xml file. Below is my python code. I am using
> python 2.5.2 on a Windows XP machine.
>
> Test.py
> from xml.etree.ElementTree import ElementTree as ET
>
> # create a new file defined by the user
> f
2008/3/31 Doran, Harold <[EMAIL PROTECTED]>:
>
> But, now I am trying to apply the code I have written to a real xml file I
> need to work with and things are hitting a road block. Is anyone on this
> able willing to look at an xml file I can send them and work with me through
> a small example to
XML data.
Cheers,
Robert
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Doran, Harold
Sent: 31 March 2008 18:35
To: xml-sig@python.org
Subject: [XML-SIG] Learning to use elementtree
Dear List:
I am brand new to xml and have some experience with python using it to
Dear List:
I am brand new to xml and have some experience with python using it to
parse through text files. Now, however, I need to use python to parse
through some xml files. I am working with elementtree right now and am
able to make this work on some toy examples. Things are going well with
the
12 matches
Mail list logo