xmlToS4 function

General mechanism for mapping an XML node to an S4 object