I haven't actually tried this but I've looked into it. Here is the collection of links I saved for that purpose it might help you achieve what you are trying to do with the tags:
http://www.virtuallyghetto.com/2011/01/how-to-extract-host-information-from.html