Create QuadMenu Items upon a XML file.

Hello. I'm a vizualisator, working in a small studio. Not long ago I've started to explore maxscript for studios workflow optimization.

At the moment I've started to write script, that exports vray mat to xml with all properties and map properties. And in my case I'm trying not just to read the data back in file and assign a newcreated material.
But I want to make a script, that will always create a quadmenu submenu items, that correspond to material groups, which i store in XML file, and then for each type append a menu item that corresponds to a material.

I looked through MXS help, and only found a CreateItemFrom action way. But it only supports alreadywritten macroscripts actions.

Is there a way to make menu items (quadmenu) which will implement a piece of maxscript code like that :

mymat = VrayMt() 
$.material = mymat

At the end I want to write a script, that will generate as much menu items in quadmenu, as XML file will provide. And it will generate everytime max starts.

Any advice will be appreciated.