I have taken a slightly different approach. Instead of building up a single xog request, I am breaking it up into a single soap:invoke for each object.
I have also been working on eliminating the sql:update commands within our Gel scripts – we have over a hundred that have sql:update.
To that end, I have a simple program that extracts all the current Gel scripts and places them into a file structure on my disk. With this I can do text searches looking for with scripts have sql:update statements.
I have started to use gel:include tags for common functions: login, logout, Xog Object (read/write) templates, read properties, dump context. To do this, I have defined a common set of vars for use across the context i.e. XogSessionId for the session id, the name of the Xog Object include file is the name of the var holding the parsed xml.
In addition to include files, I have setup a common template. Within this template, there is a defined approach to handling exceptions, running the script in debug mode, being able to break out of the script given a condition. I have also added logging and a debug:break taglib to the command line xog client (which is where I do my development) to enable using gel:log instead of gel:out and using a debugger for development.
My goal is to be able to develop scripts in a development environment, test them within the test environment and deploy them to production without any script modification between environments.
My next task is to have a include function that parses a sql recordset into an arraylist => hashtable object (the first pair in the arraylist is the code, pair object is the parent code, 3-n are the attribute names and values). With this type object definition it would be easy to have flexible routine for parsing the object and calling soap:invoke for a given object write format. I am doing this today within scripts but I haven’t pulled it out into an include file.
On a side note 13.3 has a setting for “Maximum XML Nodes” which specifies the number of XML nodes that can be imported or exported. The default value is 150,000. So if you do head down the create XML file to be Xoged, you will need to make sure you don’t exceed this setting.
V/r,
Gene