Accessing data in xml through flash

for those of you who use xml in flash, let’s say you use the following xml document:

<text>This is text in the titlebar</text>

and you wanted to access the value in main/titlebar/text… how would you go about it? do you have to use the nextSibling command and a for loop to count down until you get to the one you want?