You will need to use the DOM for attributes. Try the following syntax: document.getElementByTagname(TAG NAME IN QUOTES).attributes.getNamedItem(ATTRIBUTE NAME IN QUOTES).value;
I know its a pain with the DOM, but it works for me.
For example:
For XML <person name="Bruce">, your javascript would be:
document.getElementByTagname("person").attributes.getNamedItem("name").value;
I tried it on my machine and it works :)
Bruce