Brian - I have not encountered "plist" in any of the (non-Apple) XML with which I work. Looking at your example, it appears a "plist" is less than XMLish in that it assumes a given "key" tag applies to the immediately following item - this is not necessarily a bad thing, it just seems philosophically different from what I've encountered. The XML I've seen mostly likes to uniquely tag things to death or use attributes to accomplish what the plist seems to be doing here.
It is tempting to abandon the XML addon and use "cut" for parsing - I have done so at times myself. It's really your decision to weigh the trade-off between the necessity of future generality versus current simplicity. In most of my recent work, I haven't bothered with the addon. Regards, Devon On Sun, Jan 23, 2011 at 11:01 AM, Brian Schott <[email protected]>wrote: > I have been reading the fine jwiki xml entries > contributed by Oleg, Devon, and others, to enable me to read > some game history data I have acquired. But I have not quite > gotten the hang of the coding required, so I am asking for > ideas here. Because the data file [see below] is so strongly > structured with one line for each triplet `<...>...</...>LF` > and each triplet in pairs, and each pair in the same > sequence of 5 pairs, and each such sequence between <dict> > and </dict>, my most recent thought is to abandon most of > the xml and just use nested Cut conjunctions starting > with ;._2 based on trailing LFs. > > But before doing any real coding I thought I would > ask hear for thoughts, ideas. An excerpt from the data file > is listed below. The header information uses the term PLIST > which makes me wonder if this is a standard xml format? > > Thanks, > > <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST > 1.0//EN" "http://www.apple. > com/DTDs/PropertyList-1.0.dtd"> > <plist version="1.0"> > <array> > <dict> > <key>date</key> > <date>2010-07-25T02:55:34Z</date> > <key>duration</key> > <date>2001-01-01T00:29:10Z</date> > <key>gameNumber</key> > <real>94163764</real> > <key>moves</key> > <integer>23</integer> > <key>result</key> > <string>Loss</string> > </dict> > <dict> > <key>date</key> > <date>2010-07-05T19:46:01Z</date> > <key>duration</key> > <date>2001-01-01T00:08:44Z</date> > <key>gameNumber</key> > <real>192061342</real> > <key>moves</key> > <integer>108</integer> > <key>result</key> > <string>Win</string> > </dict> > ... > > > -- > > (B=) > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm > -- Devon McCormick, CFA ^me^ at acm. org is my preferred e-mail ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
