Parsing XML

Hey guys, got a question for you.

I have an XML document that looks like this:

<?xml version="1.0" encoding="iso-8859-1"?>
    <!-- BASE -->
    <item name="base">
    <!-- STEEL TABLES -->
    <item name="table1">

I want to parse this in Actionscript3. I can return the attributes (name=“base”), but cannot receive the values of just the nodes. When I use this code:


loader.addEventListener("complete", init);

function init(e:Event){
  doc.ignoreWhite = true;
  xml = XML(;
  for(var i = 0; i<doc.firstChild.childNodes.length; i++){

(The commented line would return the attribute)

I get the full tag. How can I isolate just the node value??