Patent ID: 8150834

Claim:
An assisting method for accessing a markup language document, wherein the markup language document comprises a plurality of elements, the assisting method comprising: establishing an intermediate table in a storage unit, wherein the intermediate table comprises a length field, a depth field, a type field, a parent element field, and an offset field; transforming a structure data of each of the elements into the intermediate table to respectively store a string length, a hierarchy depth, an element type, a parent element index, and an absolute position of the element into the length field, the depth field, the type field, the parent element field, and the offset field; and accessing the markup language document according to the intermediate table, wherein the step of accessing the markup language document according to the intermediate table comprises: providing a location path, wherein the location path comprises a plurality of items; and sequentially querying the elements corresponding to all the items in the location path from the item at a lowest level in the location path by using the parent element indexes of the elements in the intermediate table, wherein the step of sequentially querying the elements corresponding to all the items in the location path from the item at a lowest level in the location path by using the parent element indexes of the elements in the intermediate table comprises: querying an element corresponding to the item at the lowest level in the location path from the markup language document; and querying a parent element of the element by using the parent element index of the element in the intermediate table, and determining whether the parent element is corresponding to an item at a next level in the location path, wherein if the parent element is corresponding to the item at the next level in the location path, the items in the location path are continuously queried by using the intermediate table until the item at a top level in the location path is queried.