A method for dynamically generating a graphical user interface (GUI) from XML-based
documents. In accordance with the method, visual components or display objects
for building a GUI are defined, as well as a layout hierarchy describing layout
relationships between the display objects, specifying how related display objects
are to be laid out relative to each other on a layout window in the GUI. XML elements
in an XML document pertaining to respective display objects are identified. A GUI
is generated by rendering the identified display objects on the layout window,
wherein the size and the position of each display object is based on layout rules
defined by the layout hierarchy and a hierarchical position of the XML element
pertaining to the display object within a hierarchy of XML elements of the XML
document. The appearance of display objects in the GUI may also be altered through
the use layout descriptors.