In my script, I have
<data srcexpr="getMsg" name="msgInfo" method="post" namelist="id"/>
which returns (as can be verified in a log statement)
<?xml version="1.0" encoding ="UTF-8"?>
<messageInfo>
<ID>12</ID>
<text>This is the standard default test message.</text>
</messageInfo>
I then try to parse this in ECMAScript
<script>
rows = msgInfo.documentElement.getElementsByTagName("text")
if (rows.length > 0 ) {
TextToSend = rows[0].nodeValue
}
</script>
which does not work; this fails with a complaint about the array subscript. What's happening is that the value of rows, as seen in a log, is
<text>This is the standard default test message.</text>
and it seems to be a single element rather than a NodeList.
Evenif I try rows.nodeValue, treating this return value as a single Node instead of a NodeList, I get no data -- I get undefined.
I expect that I'm overlooking something obvious, but this methodology has worked for me in other (browser) contexts.
We've Moved! Please visit our new and improved forum over at our new portal: https://portal.plumvoice.com/hc/en-us/community/topics
NodeList as a result of getElementsByTagName?
IVR NodeList as a result of getElementsByTagName
Hi,
That is correct. Using the IVR system, you have to implement it in this way to make the type as text.
Regards,
Plum Support
That is correct. Using the IVR system, you have to implement it in this way to make the type as text.
Regards,
Plum Support
Plum Support
http://www.plumvoice.com
http://www.plumvoice.com