Help using the HMC5882L as a metal detector


I've been trying to find tutorials related to using the HMC5882L as a metal detector rather than a compass. The only thing I've found that seems like it could be related is the tutorial located on this site: (I'm using Arduino Uno, version 1.0.4, and some of the code in this tutorial has changed between an older version and this one. The errors that come up tell you what to change it to). However, I'm not really clear on what x, y, z values are being received and how to go about receiving the magnetic values. Any ideas on how I can go about doing this? Many thanks