OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   RE: [xml-dev] elements or attributes

[ Lists Home | Date Index | Thread Index ]

Ahhh criminy... we can answer this quick or spend a day explaining why we don't
answer it.   The short answer is you must understand some restrictions on the use
of attributes and then you must choose what you want in terms of access to the values.
 
1.  The two aspects that will usually help one make the decision is that attributes can't repeat inside
an element and only elements can contain elements.  Attributes are value pairs.   There are other
subtle aspects that one can learn about at the sites referenced by Mike and Bob.
 
2.  Verbosity is your choice.   XML doesn't care if you use
 
<coordinate>1 1 1</coordinate>
 
or
 
<coordinate x="1" y="1" z="1" />
 
or
 
<coordinate><x>1</x><y>1</y><z>1</z></coordinate>
 
Then it is is your choice on your methods for getting and setting values.
 
If this issue is hard, do buy a good book on XML.  I recommend XML 1.1 Bible, Third Edition by
Elliotte Harold, from Wiley.   It covers a lot of ground without too much arcane material.
 
len
 




 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS