public var newtreeItems:XML = <items><page caption="Page"><scene caption="Scene"></scene></page></items>;
private function BtnClick():void{
var params:Object = {};
params["call"] = "WriteXml";
params["XmlValue"] = newtreeItems.toString();
Alert.show(xmlValue);
hsData.send(params);
}
<mx:HTTPService id="hsData" url="http://localhost/FlexXmlTest/Default.aspx"
fault="httpFaultHandler(event)"
result="httpResultHandler(event)"
method="POST"
/>
Asp
switch (Request["call"])
{
case "WriteXml":
WriteXml(Request["XmlValue"]); // "in this method i am using StreamWriter to write as xml file"
break;
case "AnotherMethod":
// your method call
break;
}
I cant able to post this xml value to that page... on that i am saving as a xml file..but if i send any string value like ("hi how r u") with out any tag means its working fine ..
how to send xml formatted string via HTTPService ?