-
1. Re: how to bind to local xml file?
Gurdeep Singh Aug 10, 2010 9:32 PM (in response to Mark Embrey)This appears to be a Flex question. Please try posting your it to the Flex forums
http://forums.adobe.com/community/flex/flex_general_discussion
-
2. Re: how to bind to local xml file?
Balakrishnan V Aug 10, 2010 11:52 PM (in response to Mark Embrey)Could you please clarify which of the following you want to do
1. You have an (Actionscript)XML variable in a different file and want to bind to that.
2. You have XML inside a .xml file and want to bind to that
Thanks
balakrishnan v
-
3. Re: how to bind to local xml file?
Mark Embrey Aug 11, 2010 10:36 AM (in response to Balakrishnan V)Balakrishnan V,
I have XML inside a .xml file... that's what I want to bind to.
thanks,
MCE
-
4. Re: how to bind to local xml file?
Balakrishnan V Aug 11, 2010 10:46 AM (in response to Mark Embrey)http://www.adobe.com/devnet/air/flex/quickstart/xml_prefs.html - This should help you, i guess.
In short,
private function saveXML():void{personXML.firstName = fName_txti.text;personXML.lastName = lName_txti.text;
var newXMLStr:String = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" + personXML.toXMLString();
var fs:FileStream = new FileStream();
fs.open(file, FileMode.WRITE);
fs.writeUTFBytes(newXMLStr);
fs.close();
}
This function can be the eventHandler function for, say an XML change event etc.
Hope this helps,
Balakrishnan V

