Remove line

hi all, am wondering if someone bumped into this problem. am loading xml to flash. i have 2 xml files, courses.xml and history.xml. i have done the history part where i add the courses done (write and save the xml). now, the courses has all the lists of the courses that can be run by a user, when the course is done the line of that specific course should be out of the lists. this is how it looks on flash after loading the courses.xml:

<item course=“ex01” lesson=“les01” startDate="" startTime=“00:00:00” />

<item course=“ex02” lesson=“les02” startDate="" startTime=“00:00:00” />

after taking the (e.g.) ex01, am looking for a command that does this:

  • check the course done (can do)
  • check which line that course appears
  • remove that line
  • save the xml file (can do)

hope that explains a lot.