How to parse large XML files in PHP?

Some time ago I was faced with the problem of parsing large XML files in PHP. While the small files are no problem and all is quickly parsed, an attempt to pare larger files often causes timeout or Internal Server Error. Such large files, however, are often used for remote updates of offers (eg, published by the wholesalers). How to deal with it?