|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Be the architects of evolution and help create the mobile internet future. It’s your move---enter to win here! |
|
#1
|
||||
|
||||
|
coding practice : attribute or element?
As I work more and more with XML, I run accross situations where I could use either an attribute or create another element to provide the same data. Example:
Code:
<method name="foo" since="1.0.0"> ... </method> // or // <method> <name>foo</name> <since>1.0.0</since> ... </method> Please don't just say which to do, provide some kind of real world example as to why. Thanks.
__________________
# Jeremy Explain your problem instead of asking how to do what you decided was the solution. |
|
#2
|
||||
|
||||
|
I found this thread and describes pretty well how i approach the topic.
http://www.esrf.fr/exp_facilities/p...e/msg00080.html http://www.intelligenteai.com/XMLRe..._attributes.htm
__________________
mr... mike.rusaw@realpage.com RalPage, Inc. "I have made this letter longer than usual, only because I have not had the time to make it shorter." - Blaise Paschal Last edited by mrusaw : July 31st, 2003 at 09:49 AM. |
|
#3
|
||||
|
||||
|
Thanks for those links. Are we the only two people in the XML forum?
|
|
#4
|
||||
|
||||
|
no prob.
hahaha, i think so... |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > XML Programming > coding practice : attribute or element? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|