Karthikeyan Singaravelan <tir.kar...@gmail.com> added the comment:

It seems you have added a reply with the program at 
https://bugs.python.org/file48049/unnamed but it's filled with escaped HTML I 
hope. I assume you have a problem that there are 34 items with 'operation name' 
under grep and in the program it causes IndexError on 30th item.

# Download the file

➜  backups $ wget https://bugs.python.org/file48048/EbsService.wsdl

# Sample program 

➜  backups $ cat bpo35736.py
from xml.dom import minidom
xmldoc = minidom.parse('EbsService.wsdl')
operations = xmldoc.getElementsByTagName("operation")

for s in operations:
    print(s.attributes['name'].value)

# The text reported in the original report
➜  backups $ python3.7 bpo35736.py | grep mammographieIndikationenErmitteln
mammographieIndikationenErmitteln
mammographieIndikationenErmitteln

# Run the program and there are 34 items
➜  backups $ python3.7 bpo35736.py | wc -l
      34
➜  backups $ grep 'operation name' EbsService.wsdl | wc -l
      34


Please try attaching the program as a message or file complete with imports so 
that I can run on my computer. From my initial program above this doesn't seem 
to be a bug with xml.etree and more of a logic problem with the code.

Thanks

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue35736>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to