Parsing XML with Python

  • Status: Closed
  • Prize: €30
  • Entries Received: 2
  • Winner: AurelianR

Contest Brief

We want the attached file parsed with Python.
The following data shall be parsed to variables and ready for printing to the console:

1) All elements included in <first>
Eg.
print idendifier
print issue-time-utc
.. and so on

2) A loop of all <area> elements included in <second>. The number of elements will change so it must loop all elements independent of the number of elements
The loop shall produce the following variables
a)data-period
*index
*start-time-local
*end-time-local
*start-time-utc
*end-time-utc
b)element (first item)
*type
*Number (marked as 5)
c)element (second item)
*type
*Number (marked as 8)
d)text
Eg.
print index
print start-time-local
.. and so on. This shall be done / looped for all area elements in the file (With the possiblity to read even more areas if included in the file.)

The python script must well commented and possible to edit without large changes if the xml layout is slightly modified.

Recommended Skills

Employer Feedback

“Delivery as expected, well done.”

Profile image mch0, Norway.

Public Clarification Board

  • marioorsolic
    marioorsolic
    • 11 years ago

    I have the contest entry ready, but I cannot upload it, the allowed files are only image files :)
    Please contact me when you have this corrected

    Best regards,
    M.

    • 11 years ago
    1. kmpal
      kmpal
      • 11 years ago

      Upload file anywhere, like google drive, attach any image with your entry and send link of file to google drive

      • 11 years ago
  • mch0
    Contest Holder
    • 11 years ago

    Hi! 2.7 would be fine.

    • 11 years ago
  • marioorsolic
    marioorsolic
    • 11 years ago

    Hello,What Python version do you preffer?

    • 11 years ago

How to get started with contests

  • Post your contest

    Post Your Contest Quick and easy

  • Get tons of entries

    Get Tons of Entries From around the world

  • Award the best entry

    Award the best entry Download the files - Easy!

Post a Contest Now or Join us Today!