Re: load xml through lua ?
Posted by: Michael G. Zinner
Date: September 19, 2005 11:15AM

kshitij,

the complete application state information together with all data is stored in the "Globals Tree". This is the tree that you can browse in the Lua shell when you press F4.

It can be accessed with grtV.getGlobal and grtV.setGlobal. To get help about these commands simply type ?grtV or even ?grtV.getGlobal and ?grtV.setGlobal.

The store the current globals tree to the file "globals.xml" you can do

/ > grtV.save(grtV.getGlobal("/"), "globals.xml")

And to load the globals tree you do

/ > grtV.setGlobal("/", grtV.load("globals.xml"))

Of course this can also be done from a Lua script at any time. When you look at http://svn.mysql.com/svnpublic/mysql-migration-tool/source/windows/Main.pas at the function procedure TMainForm.RestoreSnapshot(FileName: WideString); you will see that I adjust the current section and page from the values stored in /migration/applicationData/CurrentSection and /migration/applicationData/CurrentPage. This is the only addition I do in the GUI and this is not needed in the script of course.

Can you tell me what exactly are you trying to do?

Mike

Michael Zinner, Team Lead, Developer Tools
MySQL AB, www.mysql.com

Are you MySQL certified? www.mysql.com/certification

Options: ReplyQuote


Subject
Written By
Posted
September 19, 2005 01:45AM
Re: load xml through lua ?
September 19, 2005 11:15AM
September 21, 2005 09:45AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.