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] ConciseXML arguments

[ Lists Home | Date Index | Thread Index ]

2.) Really?
<KVpair>
 <key>I can be anything even <mixed-content />, amazing huh?</key>
 <value>So can I.</value>
</KVpair>
 
Yes, really.  I was not saying that
it can't be done, I was saying that
key-value can't be done in a consistent
way.  Every XML document can choose a different
way to represent fields/properties/parts.
Having multiple ways leads to all
the problems around attributes vs. elements.
Below are just six XML 1.0 acceptable ways to
represent a key-value part.  The reason
there are so many is because there isn't
a single good way to do it!
 
<foo a_key="a_value"/>
 
<foo> <a_key>a_value</a_key> </foo>
 
<foo>
 <field><key>a_key</key>
        <value>a_value</value>
 </field>
</doo>
 
<foo>
 <field id="a_key">a_value</field>
</foo>
 
<foo>
 <field> a_key a_value </field>
</foo>
 
<foo>
 <fields> a_key=a_value </fields>
</foo>
 
...and many other representations as well.
 
ConciseXML eliminates all the issues around
attributes vs. elements.




 

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

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