Cannot display xml when file.jpg is in it? (parsing xml with php)

I was looking at this script http://www.kirupa.com/web/xml_php_parse_intermediate.htm

I was able to use it properly to parse an xml file but the only thing it doesnt display is when the info is just a filename . for example in my xml file i have <filename>thing.jpg</filename> and this is the only variable that won’t display from the array. It displays everything else just fine. any clues on why this might be? I am not trying to display the picture itself, i just want to display “thing.jpg” just like any other regular text.