Magic Method Exercises ====================== .. exercise:: In Recipe #1, add a ``dump(tag, filename)`` function that generates output to a UTF-8 encoded file. (That is, it should be able to generate HTML pages that correctly display international characters.) .. exercise:: The calls to ``dojo.require()`` are hard coded inside the ``dijit`` function, which in general is not a good idea. Make it so that the require JavaScript section is dynamically generated based on what tags you use. .. exercise:: Add a ``load(filename)`` function that converts an XML file to a hierarchy of ``Tag`` objects. You should be able to process XML files like this: .. sourcecode:: xml
This is a Button
This is a TextBox
This is a CheckBox
This is a DateTextBox