摘要 |
A method for accessing data in an XML file includes: judging whether the index file of the XML to be accessed exists, and constructing the index file if the index file does not exist; reading the index file of the XML into the memory; searching identification information according to pre-defined rules, and obtaining location parameters of the identification information; extracting corresponding data objects or elements according to the location parameter from the XML file according to the identification information. The present invention may locate the data objects or elements efficiently and quickly by constructing the index file, thus accelerate speed of accessing data in a large-scale XML file, and make user's operation sense better.
|