I put together some PHP code to access and manipulate an OPML document.
A working example is at http://www.defconzero.com/phpopml/view.php and
free (as in libre) code at
http://www.defconzero.com/phpopml/phpopml.tar.gz
It's not perfect, but it works.