I am thinking of this data as a data set, perhaps is used the word database
too cavalierly. My purpose was to see if there was any trends in my
personal Freecell game playing skills. If the data format changes, I guess
I will alter my code, in this case.

You are way ahead of me on thinking about generalizing this example. I am
not really familiar with dicts in general, and only saw the <dict> scheme
as a way to collect the data. I have never imagined dealing with a complex
file like the one in your examples. So it is hard for me to follow your
example. But presently I have no immediate needs for xml beyond the one I
showed.




On Wed, Feb 12, 2014 at 4:08 PM, Raul Miller <rauldmil...@gmail.com> wrote:

> I can throw together an example or two, but first allow me to make an
> observation, and ask a question:
>
> The observation is that the xml itself is a bit messy. Every data item you
> have mentioned corresponds to a pair of [consecutive] xml elements. And, as
> is usual for xml, the result is somewhat overspecified. This means that we
> have a variety of ways of extracting the data and it's worth just a few
> moments of thought about potential variations:
>
> (1) We can rely on sequence for all elements in a dict - they will not
> change, or
> (2) We can only rely on sequence for the minimal pairs needed to identify
> the data items of a dict, or
>  (3) We cannot rely on the sequence but instead must fail with an error
> when it is violated.
>
> And there's a similar line of questions about potential future extensions
> of the underlying dataset - are they errors, or to be ignored or to be
> handled according to some uniform rule? Or is it simply that you would plan
> on fixing the code if the format changed?
>
> (This could be simpler if the xml were structured differently.)
>
> Since you have suggested that this represents a database, I thought I would
> know the answers to these questions, but looking at your implementation I
> see something different, and I would like to hear your thoughts before
> tackling any implementation(s).
>
> Thanks,
>
> --
> Raul
>
>
>
-- 
(B=)
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to