XML/JS -> error: getAttribute is not a function?

Here is my XML:

<form name="testForm">
    <field>
        <display>Item 1</display>
        <value>Item 1 Value</value>
    </field>
    <field>
        <display>Item 2</display>
        <value>Item 2 Value</value>
    </field>
</form>

I want to access the value “testForm”, and I should be able to do this using getAttribute.

My javascript:

var xmlResponse = ajaxVar.responseXML;
var theForm = xmlResponse.getElementsByTagName("form");
alert(theForm.getAttribute("name"));

However both IE and FF complain that “getAttribute” is not a function.

I was reading something about “phantom nodes” earlier. Do I have to reformat my XML?