• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 21. XML and Flash > Elements Versus Attributes

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 7 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.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint