XMLWriter, GMLWriter?

7 views
Skip to first unread message

Martin Davis

unread,
Feb 12, 2009, 1:49:05 PM2/12/09
to JEQL Users
I'm thinking about adding an XML writer and a GML writer to JEQL.
These could work as follows:

- a table would be output as a collection element containing a series
of row elements
- the collection tag and row tag would be specified as parameters to
the writer
- column names would provide the element names for the data elements
in each row
- attributes could be specifed by a special distinguished column name
syntax (eg something like "_name")
- Geometrys could be output as GML Geometry if desired
- Date format can be performed by formatting Dates into Strings in the
src table

Would this be of use to anyone? Any other ideas?

And then of course the next step is to provide Readers for this same
class of formats...

This will work well with the upcoming Jeql Web Server... 8^)

Sunburned Surveyor

unread,
Feb 12, 2009, 7:46:26 PM2/12/09
to jeql-...@googlegroups.com
Martin,

If you move forward with this and are interested, I've written some
XML code that can be used to represent XML elements in-memory, like
JDOM. You could pair this code with a sTaX XML-writter to create a
low-memory footprint outputter for Jeql that is still easy to work
with in-memory.

SS

Martin Davis

unread,
Feb 13, 2009, 11:33:10 PM2/13/09
to jeql-...@googlegroups.com
Thanks for the offer, SS. 

Actually one of the key features of JEQL is that it tries to avoid requiring data to be in-memory where it can.  In many situations tables can be read from inputs, processed, and written out in a streaming fashion, without being limited by the size of main memory.  So I'm writing the XMLWriter to operate on the standard JEQL table data structure, which abstracts away the actual location of the information in the table. 

I've basically got the XMLWriter done - it wasn't too hard to do, for the straightforward use case of simply representing a table and rows in XML (of course, it allows the tagnames to be customized). 

I do like that STaX API - I used it to develop the KMLReader for JEQL.  Thanks for alerting me to that!  It's much easier to think in terms of pull parsing than push parsing, I find.   I'll probably play around with using it to build an XMLReader as well (without trying to get too fancy - probably something like the idea used in the JUMP GML Reader, of specifying elements which contain content to be parsed)

M
Reply all
Reply to author
Forward
0 new messages