0

I have a variable name soapXML which is of type XML. I am trying to turn it to a stiring (which the a channelMap confirms) but when I try to get the length it is always when I know that is not the case. Why is this happening?

var aaaaaa = soapXML.toString()
channelMap.put('a', typeof(aaaaaa))
channelMap.put('b', aaaaaa.length)

EDIT:

console.log(typeof soapXML)
var aaaaaa = soapXML.toString()
channelMap.put('A', aaaaaa) //Blank String
channelMap.put('B', typeof(aaaaaa)) //String
channelMap.put('C', aaaaaa.length) //0.0
Bergi
  • 630,263
  • 148
  • 957
  • 1,375
PJ445
  • 29
  • 6
  • 3
    Can you update this code such that is represents a [mre]? I'm not familiar with a type named `XML` from the ECMA standard. How is `soapXML` generated? What is `channelMap`? How is it instantiated? What is the string value of `aaaaaa` that you're *sure* it's not length `0`? – esqew Mar 09 '23 at 21:31
  • 1
    (For some context, Mirth implements E4X) – Ry- Mar 09 '23 at 21:41

0 Answers0