The invention provides a file read-write method and
system based on an
XML template and
electronic equipment, and the main scheme is as follows: text files are converted into data to be put in storage, file related attributes are configured through the
XML, and read-write batch put-in-storage operation is performed on the text files in a specified
directory and a ready state. File fields needing to be stored are screened out, storage rules are screened through
XML configuration data, to-be-stored text data are read and written, and to-be-operated
data information is obtained; in the to-be-operated
data information, selecting a to-be-operated table name and a data column configured by corresponding
field mapping in the table through self-defined data screening to generate a corresponding table entry
SQL, and performing persistent storage. According to the invention, by using the
file storage configuration, only the corresponding
file storage operation needs to be configured, and after the service is accessed, the service can be newly added, expanded and changed only by modifying part of the configuration, so that
redundant code development in a
hard coding mode in the service expansion is avoided, and the manpower investment of development, test, operation and maintenance is reduced.