Reading a file that is changing and getting the new lines

2009-12-01 Thread Ouray Viney
Hi: Problem: = I want to read a ASCII text file that can have data appended to it. I have hacked some code together that handles the basics, but it falls short. My code doesn't read in the new lines that could have been added to the end of the file. Not python's fault, more that I don't

Re: Counting Elements in an xml file

2008-08-30 Thread Ouray Viney
On Aug 30, 2:17 pm, Paul Boddie <[EMAIL PROTECTED]> wrote: > On 30 Aug, 19:37, Ouray Viney <[EMAIL PROTECTED]> wrote: > > > > > > > > I would like to be able to count the number of TestCases that contain > > the "execute=true" but not the on

Counting Elements in an xml file

2008-08-30 Thread Ouray Viney
Hi All: I am looking at writing a python script that will let me parse a TestSuite xml file that contains n number of TestCases. My goal is to be able to count the elements base on a key value pair in the xml node. Example I would like to be able to count the number of TestCases that contain

Re: Replace value of node using getElementsByTagName

2008-08-10 Thread Ouray Viney
On Aug 10, 9:01 am, Stefan Behnel <[EMAIL PROTECTED]> wrote: > Ouray Viney wrote: > > Is there an easy way to replace the node value of ?  Perhaps I am > > trying to use the wrong python XML library? > > Looks like it. Try ElementTree. > >     from xml.et

Replace value of node using getElementsByTagName

2008-08-10 Thread Ouray Viney
Xml 8.4.27.5 python from xml.dom import minidom xmldoc = minidom.parse('C:\TestProfile.xml') xmldoc ibNodeList = xmldoc.getElementsByTagName("ib") firstChild = xmldoc.firstChild for node in xmldoc.getElementsByTagName('ib'): # visit every node print node.toxml() node.replaceChild("8.