xml3.py fixed loop