On Dec 31, 2008, at 11:59 AM, David Bovill wrote:
One question about the data structure:
[root]
[...@attributes]
[attr1]
[node]
[node] = value
This would mean that to extract the plain tree structure you would
have to:
filter keys(someArray) without "@*"
Isn't this unnecessarily slow?
What do you think about:
- put treeArray ["_tree"]["root"]["node"][1] into nodeContents
- put treeArray ["_attribute"]["root"]["node"][1]["style"] into
nodeStyle
- put keys(treeArray ["_tree"]["root"]) into level1
Out of interest what do you use them for?
I've never timed the overhead of filter but in my case I don't notice
a speed hit and the structure isn't unnecessary. I use these
conversion routines to facilitate interfacing with web services. As
soon as I receive a response from the server I convert it to a
Revolution array. If I need to send a request then I create an array,
convert to XML and send it. Often I need to be able to extract an
entire node and send it to a function for further processing. If the
attributes were stored in a different branch in the array then it
would complicate the code for doing this.
In general I've found I can code much more quickly and end up with
more readable code when working with the new MD arrays as opposed to
the revXML calls.
Regards,
--
Trevor DeVore
Blue Mango Learning Systems
www.bluemangolearning.com - www.screensteps.com
_______________________________________________
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution