Elements Versus Attributes


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.




Macromedia Flash Professional 8 Unleashed
Macromedia Flash Professional 8 Unleashed
ISBN: 0672327619
EAN: 2147483647
Year: 2005
Pages: 319

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net