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