摘要 |
<p>The present invention concerns a method for processing a structured document to render, such as XML or HTML files. The method comprises the steps of: parsing the structured document into parsed tokens TK of structured data; constructing a first tree structure DTree storing the structured data of parsed tokens; constructing a render tree structure RTree storing the document content to render, said render tree structure being synchronized with the first tree structure; rendering the structured document based on the render tree structure RTree; wherein constructing the first tree structure DTree comprises deciding, for each parsed token TK, whether or not the parsed token is to be stored in said first tree structure, and storing the structured data of the parsed token therein only in case of positive decision. Partial first (DOM) tree DTree is therefore stored in memory, reducing memory use and processing time before rendering the structured document.</p> |