Model generation at runtime

I am just start to using yii.

But according to my project I need dynamic model generation from xml which is stored in the database.

I need to load an xml document, generate model base on it and create forms which will work with data.

If to speak about database structure it consists form one table

id-name - value - root_atttribute

which store user data

and

and table id - xml_data - some_attributes_to_identificate_template

which store internal structure of data

If to speak about databse I can dynamicly generate views to simplify working with database, but the structure of views may be different for different users etc

Is it possible in Yii?

Best regards Denis Eltsov