A few hints on XIF here.. For business partners I would avoid using the XIF adapter and just use the BUPA BAPI's for creation, those are much faster. If you are writing custom programs then XIF function module is too much overhead for business partners. If you still want to use the XIF adapter and that blog is not enough, then I recommend picking up a copy of my book and looking at Chapter five. It's an expanded version of that blog I wrote many years ago(the blog is only eight years old and older than my first child). However if you dig enough here on SCN you can find most of the details scattered about.
If you have an XML file then I highly recommend you upload it into your custom program as a binary blob and use a simple transformation to convert into an internal table. I did this recently and it worked great as a way to get day into an XIF business transaction function module.
I just recently finished up a data conversion between two SAP CRM systems, so I can tell you what not to do and sometimes what to do. I also am the pied piper of XIF for SAP CRM, that's how I got started sharing on SCN in the early days, so I don't mind clarifying a few questions.
Take care,
Stephen