File generation method and device, equipment and storage medium
A file generation and file technology, applied in the field of computer networks, can solve problems such as duplication of labor and spelling errors in CSS declaration codes, and achieve the effect of improving efficiency and accuracy.
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0051] figure 1 It is a flow chart of a file generation method in Embodiment 1 of the present disclosure. This embodiment is applicable to the situation of generating a CSS declaration file based on a hypertext file. The method can be executed by a file generation device, which can use software and And / or implemented in a hardware manner, the apparatus may be configured in a device, such as a terminal device. Such as figure 1 As shown, the method specifically includes the following steps:
[0052] Step 110, acquire the hypertext file, and generate a character string file corresponding to the hypertext file.
[0053] Wherein, the string file includes multiple sets of opening and closing tags in a nested manner, and each set of opening and closing tags corresponds to a class name.
[0054] In this embodiment, a hypertext file refers to a file storing hypertext codes, and there are multiple sets of tags in the hypertext codes, and each set of tags corresponds to a class name. ...
Embodiment 2
[0068] Figure 2a It is a flowchart of a file generation method in Embodiment 2 of the present disclosure. This embodiment may be combined with various optional solutions in the foregoing embodiments. Specifically, refer to Figure 2a , the method may include the following steps:
[0069] Step 210, obtain the hypertext file, and generate a string file corresponding to the hypertext file, the string file includes multiple sets of opening and closing tags in a nested manner, and each set of opening and closing tags corresponds to a class name.
[0070] In this embodiment, step 210 is the same as step 110 in the first embodiment, and will not be repeated here.
[0071] Step 220, traversing the opening and closing tags included in the string file, and nesting and storing the nested relationship between the opening and closing tags and the class names corresponding to each group of opening and closing tags in multiple data objects , get the target data object.
[0072] In this...
Embodiment 3
[0079] image 3 It is a schematic structural diagram of a file generation device in Embodiment 3 of the present disclosure. This embodiment is applicable to the situation of generating a CSS declaration file based on a hypertext file. The device can be implemented by software and / or hardware. The device can It is configured in a device, such as a typical terminal device. Such as image 3 As shown, the device may include:
[0080] The obtaining module 310 is used to obtain the hypertext file, and generates a string file corresponding to the hypertext file, the string file includes multiple groups of opening and closing tags formed in a nested form, and each group of opening and closing tags corresponds to a class name;
[0081] The parsing module 320 is used to parse the string file according to the opening and closing tags included in the string file to obtain the target data object in a tree structure, and the tree structure is used to describe the nesting form of multiple ...
PUM
Login to View More Abstract
Description
Claims
Application Information
Login to View More 


