We've Moved! Please visit our new and improved forum over at our new portal: https://portal.plumvoice.com/hc/en-us/community/topics

data element does not correctly intepret false as value

Questions and answers about IVR programming for Plum DEV

Moderators: admin, support

Post Reply
moshe
Posts: 66
Joined: Wed Aug 15, 2007 5:36 pm
Location: Chicago
Contact:

data element does not correctly intepret false as value

Post by moshe »

The data element does not accept "false" as a text value in an XML file.
Here are two identical XML files:

Code: Select all

<root>
 <leaf>true</leaf>
</root>
and

Code: Select all

<root>
 <leaf>false</leaf>
</root>
In each case I attempt to read the value of leaf by doing

Code: Select all

nodeList=info.documentElement.getElementsByTagName("leaf")
leafValue=nodeList.item(0).firstChild.toString()
This works when leaf contains "true" as show in the first example but fails when leaf contains "false" as in the second case. The failure is because "nodeList.item(0).firstChild has no properties."

I strongly suspect that this is an implementation problem related to how data are typed by the underlying engine when data arrive. It reminds me strongly of PHP-style typing of incoming data with a value of "false."

I can work around this by modifying the value of leaf in my code, but I would like to verify that this is indeed a known bug that requires a work-aound.[/code]

moshe
Posts: 66
Joined: Wed Aug 15, 2007 5:36 pm
Location: Chicago
Contact:

Never Mind... Log FIle

Post by moshe »

After another hour of slow log-based debugging, I was able to find the actual problem, which was downstream of this piece of code. A different nodeList was failing.

Post Reply