I have a string I get in from the URL of the web page. This string is in XML format:
Code:
FSCalc.html?xml=
<?xml version="1.0" encoding="UTF-8" ?>
<FSParm>
<HouseholdSize>6</HouseholdSize>
</FSParm>
Now I want to convert the string into XML and XML pairs (key-value). Here is the non-working code:
Code:
var testing:String = getQueryString().toString();
Alert.show("**Testing** query as string" + testing,"XML as string");
parseXML = getQueryString() as XMLList;
if (parseXML) {
Alert.show("**testing** parm length=" + parseXML.length(),"Test parm length");
var item:XML;
for each(item in parseXML) {
Alert.show("item:" + item.toXMLString());
}
}
Because of the Alerts, I know the string looks like this:
Code:
<?xml version="1.0" encoding="UTF-8" ?><FSParm><HouseholdSize>6</HouseholdSize></FSParm>
But when it is placed into parseXML, nothing gets there and I never reach the second Alert. I'm convinced that I'm just making a newbie mistake. Can anyone tell me what I'm doing wrong?