The GeoGebra XML format has two variants: one for Geogebra Worksheet (.ggb) files and other for GeoGebra Tool (.ggt) files. These are defined by XML Schema http://geogebra.org/ggb.xsd and http://geogebra.org/ggt.xsd respectively. Also .ggs files are used by GeoGebra Notes which may contain several slides (included as individual .ggb files)
Root elements in both geogebra.xml and geogebra_macro.xml are called geogebra and their only attribute is version. More details about XML tags used by both formats is contained in following three articles:
This structure corresponds to the XSD files used for GeoGebra XML format definition. Listed articles are generated automatically, if you find mistake in them, describe it in article's talk.