SimpleXML needed help dealing with MODS namespace

SimpleXML needed help with MODS namespace. Also some escaping of
ampersands. This code parses from
http://datashare.is.ed.ac.uk/dspace-oai/request?verb=ListRecords&metadat
aPrefix=mods without errors (but not necessarily correctly).