Reading multiple tags from .asx files

Hi, I'm trying to wget a series of .asx files, read <title> and <ref> tags from them and then sending that information to wget.

asx files contains the following information

<ASX VERSION="3.0">
		<ENTRY>
		<STARTTIME Value="00:00:00.0" />
		<TITLE>title of the movie</TITLE>
		<REF HREF="mms://192.168.0.34/139254.wmv?string" />
		<REF HREF="http://192.168.0.34/139254.wmv?string" />
		</ENTRY>
</ASX>

The information i want out of the .asx files are bold in above code.
I've googled and searched unix.com and so far i've managed to do this:

#!/bin/bash
if [ $# -eq 0 ]; then
        echo "Usage: getfiles.sh <videoid>"
        exit 1
fi
videoid=$1
file1=$(wpro "http://192.168.0.34/$videoid.asx?string" -O "$videoid.tmp")
while read line; do
        title=`nawk '/<TITLE>/,/<\/TITLE>/'`
        #$title now contains the full <title>title of the movie</title> 
        referer=`nawk '/REF/,/>/'`
done <$videoid.tmp

Somehow $referer never get's set, if i comment out the title=`nawk-line then referer is set like it's supposed to.
Does nawk "BREAK" / finish the "while read line; do"-loop after the first hit?
If so, how can i restart from the top again?

And, final question, what would you do to get the information out of the .asx files, are there better ways than this (i'm sure there are).