Yes, this is done exactly as intended. It should be trivial, once you figure it out. That's the point: to focus on content structure rather than minutia of parsing.
----- Original Message ---- > From: Tom Arneson <[email protected]> > > Oleg, > > Thanks for the encouragement. Here is my first working solution: > > NB. --------------------------------------------------------- > NB. fragment of gpx file > testgpx=: 0 : 0 > ... > ) > NB. --------------------------------------------------------- > > require 'xml/sax/x2j' > > x2jclass 'px2jgpxway' > > 'Items' x2jDefn > / := table : table=: > ,:'latitude';'longitude';'name';'description' > wpt := table=: table,lat;lon;t;d : 'lat lon'=: atr each;:'lat > lon' > wpt/name := t=: y > wpt/desc := d=: y > ) > > cocurrent 'base' > > > smoutput z=: process_px2jgpxway_ testgpx > > ------------T------------T------T-----------┐ > │latitude │longitude │name │description│ > +-----------+------------+------+-----------+ > │42.13350000│-88.97320000│99BYTH│120 farm │ > +-----------+------------+------+-----------+ > │45.84690000│-88.47240000│99BYYL│280 woods │ > L-----------+------------+------+------------ > > -----Original Message----- > From: [email protected] > [mailto:[email protected]] On Behalf Of Oleg Kobchenko > Sent: Saturday, September 05, 2009 04:59 > To: Programming forum > Subject: Re: [Jprogramming] x2j (XML to J) - innovative declarative way to > parse XML > > This is very similar to > > http://www.jsoftware.com/jwiki/Addons/xml/sax/x2j%20Examples#x2j4.ijs > > I don't want to spoil your fun. Seriously. > Give it a try and let us know how it goes. > ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
