8. The computer-implemented method of claim 1 , further comprising: determining a span of the hierarchical tree corresponding to the modification; tokenizing a portion of the XML data string corresponding to the span; and updating the hierarchical tree based on the tokenized portion.
1. A computer-implemented method for maintaining a hierarchical tree representation of an extensible markup language (XML) data string, comprising using at least one processor coupled to a memory to perform the following operations: detecting a modification to an XML data string; determining a location of the modification in the XML data string; correlating the location of the modification to at least one node in a hierarchical tree formed as a tokenized representation of the XML data string; deleting a portion of the hierarchical tree based at least in part on the modification corresponding to deleting a portion of the XML data string; determining a last node in the deleted portion of the hierarchical tree, and populating at least one sub-tree with nodes associated with the last node in the deleted portion of the hierarchical tree; and inserting the at least one sub-tree into the hierarchical tree following the deleting the portion of the hierarchical tree.