you're going to have to parse the file anyway, unless you can get away with a regular expression, so it comes back down to the SAX/DOM argument.
i would say SAX is quicker here, because you don't need to parse and store the whole document - you can write it straight back out.
i would like to know why you are using XML as a data format. i used it myself for a couple of years, but using MySQL is 15 times quicker and 5 times easier for the programmer. you can always export XML from MySQL.