See this example from RFC2518:
<D:multistatus xmlns:D="DAV:">
<D:response>
<D:href>http://www.foo.bar/container/</D:href>
<D:propstat>
<D:prop xmlns:R="http://www.foo.bar/boxschema/">
<R:bigbox>
<R:BoxType>Box type A</R:BoxType>
</R:bigbox>
<R:author>
<R:Name>Hadrian</R:Name>
</R:author>
<D:creationdate>
1997-12-01T17:42:21-08:00
</D:creationdate>
WebDAV allows the getting/setting of in part predefined or arbitrary key/value pairs. Here one prop retrieved is from the "DAV:" namespace, "creationdate", abbreviated as "D". Another is from the "http://www.foo.bar/boxschema/" namespace, indicated by its shorthand "R".
I undersstand the first one, but what about the second? As a JSON data structure this reads as
{
"DAV:": {
"creationdate": "1997-12-01T17:42:21-08:00"
},
"http://www.foo.bar/boxschema/": {
"bigbox": {
"BoyType" : "Box Type A"
},
"author": {
"Name" : "Hadrian"
}
}
}
As I understand WebDAV, resources should be able to set/get key-value-pairs, but the RFC here presents a nested multi-level data structure! How should I flat these out to key-value pairs? Or do I get the nesting in the XML wrong, is there something that I need to throw away/skip? That would explain it...
$key{'DAV:creationdate'} = "1997-12-01T17:42:21-08:00";
$key{'http://www.foo.bar/boxschema/.bigbox.BoxType'} = "Box Type A";
or what?? How do you guys handle these? Any help appreciated!