Check patentability & draft patents in minutes with Patsnap Eureka AI!

Method and system for recovering xml configuration files based on xpath

A technology for configuring files and recovery methods, applied in the direction of file system, file access structure, semi-structured data retrieval, etc., can solve the problems that the application program cannot support modifying the original default value, there is no solution, and no content recovery is provided.

Active Publication Date: 2019-09-17
FUJIAN SUNNADA NETWORK TECH CO LTD
View PDF7 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

In this way, there is a problem: when the system is restarted, the content of the XML configuration file saved on the storage medium needs to be restored to the running configuration file released with the version
[0005] For the above-mentioned problem of restoring the content of the XML configuration file saved on the storable medium to the running configuration file released with the version when the system is restarted, there is currently no complete solution, and, after restoring the XML After configuration, the XML configuration run by the system is the XML configuration saved on the storable medium, so that the application program cannot support modifying the original default value when the version is released, and the modification includes the user's modification of the XML configuration file on the storable medium modification, as well as the modification of the XML configuration file released by the software developer, but there is often a need for this in actual use
[0006] Based on the above problems, the Chinese patent application No. 201310100931.4 discloses a data recovery method based on the structure summary, mentions the use of XPATH to recover the node information of interest in XML, specifically discloses how to parse the XPATH query statement and how to restore the sense XML node data of interest, does not provide a way to restore content from one XML configuration file to another XML configuration file
Another Chinese patent application with patent application number 201110200086.9 discloses an XML fragmentation method based on query workload estimation, specifically discloses a method for traversing XML nodes to realize XML fragmentation, but also does not provide a good solution to the above problem approach
[0007] Therefore, it is necessary to provide an XPATH-based XML configuration file recovery method and its system, which can solve the problem that the prior art does not provide a feasible solution for the recovery of XML configuration files for applications that use XML files to save configurations

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Method and system for recovering xml configuration files based on xpath
  • Method and system for recovering xml configuration files based on xpath
  • Method and system for recovering xml configuration files based on xpath

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0088] Please refer to figure 2 , the present embodiment provides an XPATH-based XML configuration file recovery method, realizes the application program that adopts the XML file to save the configuration, and can restore the content of the user configuration file stored on the storable medium to the same version when the system configuration is restarted. in the published run configuration file.

[0089] Here, for the convenience of description, the version XML configuration file released with the version of the application program is regarded as the first configuration file; the user XML configuration file stored on the storage medium is regarded as the second configuration file; the priority of the second configuration file The level is greater than the first configuration file, and the system runs the first configuration file after restoring the XML configuration, that is, the XML configuration saved on the storage medium.

[0090] Single instance and multiple instances ...

Embodiment 2

[0113] Please refer to image 3 , this embodiment is further extended on the basis of Embodiment 1. The similarities will not be repeated. The difference is that the recovery process for the single instance node enables it to be realized on the basis of synchronizing the modification of the configuration file by the user. The modification of the default value of the leaf node when the application is released.

[0114] The restoration process of a single-instance node that supports the above functions may specifically include the following steps:

[0115] S01: Before each recovery, back up a copy of the first configuration file released with the version as the baseline configuration file for the next recovery;

[0116] S02: Use the depth-first algorithm to recursively traverse all the leaf nodes in the first configuration file released with the version, and record the intermediate node information during the traversal process, so as to obtain the absolute paths of all leaf nod...

Embodiment 3

[0123] see Figure 5 to Figure 6 , on the basis of Embodiment 1 and Embodiment 2, this embodiment provides an XPATH-based XML configuration file recovery system,

[0124] see Figure 4 , the system includes:

[0125] The first traversal module 1 is used to traverse all the leaf nodes in the first configuration file released with the version, and obtain the absolute paths of all the leaf nodes;

[0126] The first query module 2 is configured to use XPATH to query whether there is a corresponding leaf node in a second configuration file according to the absolute path, and the second configuration file is a configuration file stored on a storable medium;

[0127] The first writing module 3 is used to write the value of the leaf node in the second configuration file into the corresponding leaf node in the first configuration file if the query result of the query module exists.

[0128] see Figure 6 , preferably, for multi-instance nodes, the system of this embodiment also inc...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention provides an XPATH (XML Path Language)-based XML (Extensible Markup Language) configuration file recovery method and a system thereof. The method comprises the steps of: traversing all leaf nodes in a first configuration file released with a version and acquiring absolute paths of all leaf nodes; inquiring whether corresponding leaf nodes exist in a second configuration file by use of an XPATH according to the absolute paths, wherein the second configuration file is a configuration file stored on a storage medium; and if so, writing values of the leaf nodes in the second configuration file into the corresponding leaf nodes in the first configuration file. According to the XPATH-based XML configuration file recovery method and the system thereof, when the system restarts configurations, user configuration files stored on the storage medium can be exactly and rapidly recovered to a running configuration file released with the version, and an XML configuration file-based application program can be guaranteed to run normally.

Description

technical field [0001] The invention relates to the application field of XML language, in particular to an XPATH-based XML configuration file recovery method and system thereof. Background technique [0002] XML language, as an extensible markup language, is a source language that allows users to define their own markup language. As long as certain rules are followed, the scalability of XML is almost unlimited, and this extension does not require structural confusion or Affect the basic configuration at the cost. Management information in XML document format can be easily transmitted through HTTP protocol. Since HTTP is built on TCP, management data can be transmitted reliably. XML also supports standard APIs for accessing XML documents, such as DOM, etc. The XML format is a W3C standard, common to various platforms, and has good portability. [0003] XPATH is the XML path language, which is a language used to determine the location of a certain part in an XML document. B...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Patents(China)
IPC IPC(8): G06F16/81G06F16/13
Inventor 倪晋华俞大风
Owner FUJIAN SUNNADA NETWORK TECH CO LTD
Features
  • R&D
  • Intellectual Property
  • Life Sciences
  • Materials
  • Tech Scout
Why Patsnap Eureka
  • Unparalleled Data Quality
  • Higher Quality Content
  • 60% Fewer Hallucinations
Social media
Patsnap Eureka Blog
Learn More