Web technologies -- Laboratory 5 -- 2007-2008 -- info.uvt.ro

Important! These pages are somehow outdated and it is recommended to consult the newer version at Web technologies -- 2009-2010 -- info.uvt.ro (by Marc Frâncu).
edit


SAX -- Simple API for XML

edit

References

edit


Tutorials

edit


Discussion points

edit
  • serial access / stream parser
  • event driven [1]
  • callbacks [2]
  • events vs. trees [3]
    • advantages:
      • simplicity
      • memory efficiency
      • speed
      • serial file access
      • on the fly parsing
    • disadvantages:
      • simplicity -- could be also a disadvantage



DOM -- Document Object Model

edit

References

edit


Tutorials

edit



Assignment

edit

Take the XML file that you have created for the last assignment (or create a new one), and use it as an input to an SAX based application that should render it as an HTML. (In fact the result should be the same as with the XSLT style sheet, but this time you are supposed to transform the XML file using Java and SAX API.)


Please note that the XML element tree should have a minimum depth of three elements (excepting the root one). For example:

<database>
    <record>
        <attribute>
            <attribute-field>
            </attribute-field>
            ...
        </attribute>
        ...
    </record>
    ...
</database>


As usually the assignments should be committed to the Subversion repository in the folder <user-name>/assignment-04 in one of the repositories:



Ciprian Dorin Craciun, 2007-10-31, ccraciun@info.uvt.ro