Altova Mailing List Archives>Archive Index >xmlschema-dev Archive Home >Recent entries >Thread Prev - Re: Is the Type Library draft valid? [Thread Next] Re: Attribute UsageTo: <xmlschema-dev@--.---> Date: 3/17/2005 1:39:00 PM > What is the purpose of element attribute? And is there a usage > rule-of-thumb for element attribute (attribute vs. child element) ? > As noted, there is no hard-fast rule. Most programmers I've dealt with tend to prefer elements over attributes, probably because at first, with DOM, it's easier to deal with elements than attributes. Probably the best argument I've heard for elements over attributes is that they can be extended a lot easier. On the other hand, the best argument for attributes has got to be size. If you deal in large XML documents (like I do, converting EDI into XML), then the XML document can be drastically reduced if you use Attributes for your "fields" (there's only one name per field, instead of two for the open/close tag of elements). All in all, I personally prefer using elements over attributes, though see valid justifications for both, pure and mixed. HTH, Bryce K. Nielsen SysOnyx, Inc. (www.sysonyx.com) Makers of xmlLinguist, the affordable EDI to XML Translator http://www.sysonyx.com/products/xmllinguist From ht@i... Fri Mar 18 09:18:11 2005 Received: | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
