A method for random access formatting of a portion of a large hierarchical electronically published document, the electronically published document having descriptive markup defining a plurality of hierarchical elements, wherein each element has a type name, and has at least one of an ancestor element, a child element, a left sibling element, a right sibling element, and unformatted text content, the method using a representation of the electronically published document, including, for each element, an indication of any ancestor element, child element, and left and right sibling element and comprising the steps of:
- receiving an indication of a starting point within the electronically published document;
- identifying one of the plurality of hierarchical within the electronically published document as an initial element containing the indicated starting point using the representation of electronically published document;
- traversing the representation of the electronically published document to select elements of the electronically published document beginning with the initial element;
- and
- formatting only the text content contained in the selected elements.