xml schemas anyone?
i need a schema for storing key/value pairs in xml. apple’s proterty lists come to mind: http://developer.apple.com/documentation/CoreFoundation/Conceptual/CFPropertyLists/index.html (i work on a mac but need it for web development)
question: do you think it is necessary / good style / helpful to use an existing schema for storing stuff in xml contrary to creating something obscure on my own? can you recommend any schema? any link is welcome!
steven
Friday, February 20, 2004
uh ... aren't key/value pairs pretty much the definition of XML?
You can use the key as the tag and the value as the data?
What am I missing here ...
Matt H.
Friday, February 20, 2004
if you rely on someone elses schema to define your document and they change the schema, you'll have to change your document....just make your own schema
apw
Friday, February 20, 2004
Apple's schema looks similar to the SOAP support in .NET. That's useful for fully automatic (de)serialization of arbitrary data, such as remoting exceptions. However, the resulting XML files are _extremely_ large and virtually unreadable by humans. Not recommended for big datasets or permanent storage!
As for user-defined schemas, I don't see the point at all. The W3C Schema standard already defines basic data types such as integer or boolean, as well as sequences or choices of elements. Why reinvent the wheel? Defining a named instance of a custom type "Array", rather than just a complexType holding a sequence, seems like a useless complication to me.
Chris Nahr
Friday, February 20, 2004
if you have tools which can read an exsiting schema, it might be useful to use it.
or if you have unknown 'stuff', it's useful to use a <valpair><name>name</name><value>val</value></valpair> style--but that's creating a database in a database.
note that Apple's PList format is terrible--it's not really XML though it uses XML.
(it looks sometihng like <name>name</name><value>val</value><name>name2</name><value>val2</value>)
mb
Friday, February 20, 2004
<Properties>
<Property Name="prop 1" Value="..." />
<Property Name="prop 2" Value="..." />
...
</Properties>
Duncan Smart
Saturday, February 21, 2004
Recent Topics
Fog Creek Home
|