from xml.dom import minidom

mapfile = minidom.parse(System.AppPath + "Media/Demos/Demo_Themes/" + 'test.layout')

#load all layers
for Widget in mapfile.getElementsByTagName('Widget'):
	Text.SetText(Text.Text + Widget.attributes['type'].value)
	
	#buttons
	if Widget.attributes['type'].value == "Button":
		CGUI.WidgetSetEvent(str(Widget.attributes['name'].value), 8)
		
	#editbox