While fiddling around with the JS Lib XML/XMLList in reading a XML string, I’ve noticed that the Wiki example doesn’t work (in 6.1.4).
The wiki gives the following example:
var myXml = new XML('<test level="1"><test2 level="2">A value</test2><test2 level="2">Another value</test2></test>');
application.output(myXml.test2[1]); //outputs 'Another value'
(p.s. wiki example has a typo: no quotation around the value of one of the ‘level’ attributes)
following this example, in 6.1.4 (haven’t tested it in other versions) you won’t get the ouput ‘Another value’, but will get a null value.
adding .toString() will give the expected output.
Bug or incorrect documentation?