Because attributes can handle data and so can elements, the question often arises: Which one should be used for which situation? Back in Flash 5, the built-in XML parser would cycle through attributes faster than data held in elements. But with the Flash 8 Player, they parse at virtually the same speed, so now it is a matter of preference. Personally, I tend to use attributes only to keep track of which element is which. I keep most data as element data. And, in the Web services chapter, you will see that Web services format their XML in a similar fashion. |