How do I read this message using javascript? I have a basic understanding of xml and javascript.

I used getElementsByTagName("ERROR")[0].childNodes[0].nodeValue to access the error message it gave me an error saying "object required" on this line.

<?xml version="1.0" encoding="ISO-8859-1" ?>
- <ERROR key="JOBRUN_ERROR1" level="1">
- <MSG>
- <![CDATA[ Job Run Error.
- <![CDATA[
Error: Unable to find job record: job owner = NT00000029 job name = AP510.


Thanks for all the help.