MPD file reading and writing

I want to read a mpd file and increment / decrement fields like actual duration , actual work etc and thus update % completed.

My target is to increment / decrement the % completed ( changes in gant chart too) in tasks.

Any help ?