Method for locating XML text
The invention discloses a method for locating an XML text. The method comprises the following steps that a text index and text offset of a node object are stored on the node object of a DOM; the text index is the initial position of the XML text of the node object in the whole XML text; the text off...
Gespeichert in:
Hauptverfasser: | , , |
---|---|
Format: | Patent |
Sprache: | eng |
Schlagworte: | |
Online-Zugang: | Volltext bestellen |
Tags: |
Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
|
Zusammenfassung: | The invention discloses a method for locating an XML text. The method comprises the following steps that a text index and text offset of a node object are stored on the node object of a DOM; the text index is the initial position of the XML text of the node object in the whole XML text; the text offset is the difference value of the modified text length and an initial text length after the XML text of the node object is modified; when the node object in the DOM is selected, the text index of the node object and the text offset of all upper brother nodes and all father nodes of the node object and the upper brother nodes of all the father nodes are overlapped, and the position of the XML text corresponding to the node object is located. Text content comparison does not need to be carried out, and the position of the XML text corresponding to the node object of the DOM is fast located. |
---|