pool XML format, was: Re: [PD] re: state saving
Adam Lindsay
atl at comp.lancs.ac.uk
Mon Dec 1 18:14:39 CET 2003
Thomas Grill said this at Mon, 1 Dec 2003 17:31:37 +0100:
>The main reason is that a key can be any PD atom (except symbols with
>spaces) in pool, and XML attributes must not contain certain characters
>(like ' or " , probably others). The format looks a bit more general and
>robust to me than the one with the attributes. It also _looks_ more
>transformation-friendly....
It isn't, really. I was hoping to steer you away from this because it
resembles Apple's property-list format, and that's a bit of a pain to
deal with. However, the fact that you enclose keys and values within a
parent value or dir element makes things a lot easier than Apple's
format. I'm not sure I'd call it transformation-friendly, but it allows
for XPath expressions like this:
//dir[key='bla']/value[key='2']/data
(Give me the data for the key #2 that's in any directory with the key bla.)
The interesting aspect of this format is that it allows you to reverse
the lookup with minimal effort:
//value[data='51']/key
(Give me the key for all data values that equal 51.)
Who knows if that functionality is actually useful for us, though...
Yeah, looks good! I can deal with it, and it does seem more sensible than
putting the keys in attributes.
adam
--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Adam T. Lindsay atl at comp.lancs.ac.uk
Computing Dept, Lancaster University +44(0)1524/594.537
Lancaster, LA1 4YR, UK Fax:+44(0)1524/593.608
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
More information about the Pd-list
mailing list