6. A computer program product for use in conjunction with a computer system, the computer system including a user interface to display a document and issue commands to edit the document, the computer program product comprising a computer readable storage medium and a computer program mechanism embedded therein, the computer program mechanism comprising: a data structure representing the document as a hierarchical document, the hierarchical document comprising starttags and endtags and leaf contents between ones of the starttags and endtags, the data structure including starttag, endtag and leaf items representing corresponding ones of the starttags, endtags, and leaf contents; each of the starttag and endtag items representing the starttags and endtags having a corresponding index associated therewith, the data structure further including an index offset for each of the starttag and endtag items, each index offset indicating an offset to a corresponding complementary starttag or endtag item in the hierarchical document; and a document editor, executable by the computer system, for editing the hierarchical document in response to the issued commands, the document editor including instructions for traversing the data structure, both forward and backward, using the index offsets to skip over ones of the items in the data structure without having to inspect the contents of the skipped items.
6. A computer program product for use in conjunction with a computer system, the computer system including a user interface to display a document and issue commands to edit the document, the computer program product comprising a computer readable storage medium and a computer program mechanism embedded therein, the computer program mechanism comprising: a data structure representing the document as a hierarchical document, the hierarchical document comprising starttags and endtags and leaf contents between ones of the starttags and endtags, the data structure including starttag, endtag and leaf items representing corresponding ones of the starttags, endtags, and leaf contents; each of the starttag and endtag items representing the starttags and endtags having a corresponding index associated therewith, the data structure further including an index offset for each of the starttag and endtag items, each index offset indicating an offset to a corresponding complementary starttag or endtag item in the hierarchical document; and a document editor, executable by the computer system, for editing the hierarchical document in response to the issued commands, the document editor including instructions for traversing the data structure, both forward and backward, using the index offsets to skip over ones of the items in the data structure without having to inspect the contents of the skipped items. 9. The computer program product of claim 6, wherein the computer system further includes a communication link to communicate with at least one server computer; and a client process, executable by the computer system, for receiving the document and the document editor from the server computer.