![](/img/trans.png)
[英]How to display the xml file existing content in datagrid, and can be edittable and save
[英]How to display DataGrid to XML file?
我有一個要求,當我單擊 DataGrid 下方的 GeneratXML 按鈕時,Datagrid 數據將轉換為一個 xml 文件。
我認為這樣的事情會做——(我不知道你的數據是什么樣的,這是一個兩句話的問題);)
private function getDataProviderXML ( dp :ArrayCollection ) :String {
var full :String = '<root>';
for each ( var o :Object in dp ){
full += '<row>';
for each ( var prop :String in o ){
full += '<' + prop + '>' + o[prop] + '</' + prop + '>'
}
full += '</row>';
}
return full += '</root>';
}
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.