动作 - XML / E4X是慢?动作、XML、E4X

2023-09-09 21:51:43 作者:颜

我一直在阅读的XML / E4X是AVM2很慢/ ActionScript 3的。

i've been reading that XML/E4X is very slow with AVM2 / ActionScript 3.

提供XML数据的应用程序时,是否总是通常是一个更好的主意XML对象解析为对象的数组来调用,而不是使用E4X与股票的XML数据?

when supplying an application with XML data, is it always generally a better idea to parse the XML object into an array of objects to call rather than using E4X with the stock XML data?

推荐答案

除了性能问题,这将是解耦从数据源应用程序是一个好主意。

Aside from the performance issue, it would be a good idea to decouple your application from the data source.

让我们说,例如,你想使用JSON的未来......这会是更灵活的XML数据的对象传递到对象和操作数据,而不是访问XML直接。

Let's say , for example, that you'd like to use JSON in the future... It'd be more flexible to pass the XML data to an Object and manipulate your data from that Object , rather than accessing the XML directly.