No, it won't be that, because the next line takes care of
things (xml = new XML(str1);). As an aside, it's odd to see AS3
with no variable typing. A line should say: var xml:XML = new
XML(str);, not xml = new XML(str);. Both will work if you have
strict typing turned off in the compiler settings, but it's a good
idea to have strict turned on, it'll help spot some issues before
you run the movie.
But this problem isn't because of the variable typing, I
think it's because your xml doesn't fulfill the minimum
requirements for well formed XML. Read this:
http://en.wikipedia.org/wiki/Well-formed_XML_document
If I read that correctly, you need to have a root element,
which would mean that this should work for you:
str1 = "<?xml version='1.0'
encoding='ISO-8859-1'?><texts><text>Dit is een
test</text></texts>";
xml = new XML(str1);
The "texts" tag will act as the root element.
... View more