Loading XML into database

I am trying to load an XML document into the database. I first read the XML document into a record structure, then I validate it against the XML schema to ensure its a valid XML.

At this point, I would like to load the contents of a recurring element into the database. The obvious solution would be to loop over this element and insert it into the database, however, that is a LOT of inserts!

Is there a better way to do this? What about the mapping of the XML to the database – is there some mapping document I can write to allow wM to automatically load the XML into the database? What are the best practices?