CN103873459B - Automatic message generating method - Google Patents

Automatic message generating method Download PDF

Info

Publication number
CN103873459B
CN103873459B CN201310752730.2A CN201310752730A CN103873459B CN 103873459 B CN103873459 B CN 103873459B CN 201310752730 A CN201310752730 A CN 201310752730A CN 103873459 B CN103873459 B CN 103873459B
Authority
CN
China
Prior art keywords
condition value
mark
configuration file
closure element
label
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
CN201310752730.2A
Other languages
Chinese (zh)
Other versions
CN103873459A (en
Inventor
陆舟
于华章
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Feitian Technologies Co Ltd
Original Assignee
Feitian Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Feitian Technologies Co Ltd filed Critical Feitian Technologies Co Ltd
Priority to CN201310752730.2A priority Critical patent/CN103873459B/en
Publication of CN103873459A publication Critical patent/CN103873459A/en
Application granted granted Critical
Publication of CN103873459B publication Critical patent/CN103873459B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention provides an automatic message generating method and belongs to the field of information safety. The method comprises the steps that a configuration file is opened by an upper computer, root starting elements are organized and stored according to root starting element condition values in the configuration file, display starting elements and display item data are organized and stored according to display starting element condition values in the configuration file, display ending elements are organized and stored according to display ending element condition values in the configuration file, root ending elements are organized and stored according to root ending element condition values in the configuration file, the root starting elements, the display starting elements, the display item data, the display ending elements and the root ending elements are obtained and are written into a message. The message can be automatically generated by adopting the method, manual operation is not needed, manual misoperation is avoided while manpower resources are saved, and the message generation efficiency is improved.

Description

A kind of method automatically generating message
Technical field
The present invention relates to information security field, particularly to a kind of method automatically generating message.
Background technology
Message be in network exchange with transmission data cell, i.e. website data block disposably to be sent, contain by Complete data message to be sent.Message be by encapsulation in groups, bag, frame realize transmit.At present, the method generating message For defining node, re-define attribute of an element, according to property element, write message.
The inventors discovered that prior art has following defect, generate and during message, need artificial operation, lead to generating report It is impossible to avoid artificial operational error when civilian, and manually operation takies a large amount of human resourcess, wastes the substantial amounts of time.
Content of the invention
For solving the defect of prior art, the present invention proposes a kind of method automatically generating message, including,
Step S01:Host computer opens configuration file, obtains component identification from described configuration file;
Step S02:Described host computer judges described component identification type, if root start element mark then execution step S03;If display start element mark then execution step S04;If display closure element mark then execution step S05; If root knot bundle component identification then execution step S06;If message completes component identification then execution step S07;
Step S03:Described host computer judges that whether there is root start element condition value in described configuration file identifies, and is then Root start element condition value is obtained from described configuration file according to described start element condition value mark, is opened according to described Beginning element condition value tissue root start element simultaneously preserves, and described component identification is updated to show start element mark, returns step Rapid S02;Otherwise report an error, terminate;
Step S04:Described host computer judges to whether there is display start element condition value mark in described configuration file, is Then display start element condition value is obtained from described configuration file according to described display start element condition value mark, according to institute State display start element condition value tissue display start element, organize displayed entries data, and by described display start element and Described displayed entries data preserves, and described component identification is updated to show closure element mark, return to step S02;Otherwise report Mistake, terminates;
Step S05:Described host computer judges to whether there is display closure element condition value mark in described configuration file, is Then display closure element condition value is obtained from described configuration file according to described display closure element condition value mark, according to institute State display closure element condition value tissue display closure element and preserved, described component identification is updated to root closure element Mark, return to step S02;Otherwise report an error, terminate;
Step S06:Described host computer judges that whether there is root closure element condition value in described configuration file identifies, and is then Root closure element condition value is obtained from described configuration file according to described closure element condition value mark, according to described root knot Shu Yuansu condition value tissue root closure element is simultaneously preserved, and described component identification is updated to message and completes component identification, return Return step S02;Otherwise report an error, terminate;
Step S07:Described host computer removes described component identification, starts unit according to described start element, described display Plain, described displayed entries data, described display closure element, described root knot bundle Element generation message, remove described and start unit Plain, described display start element, described displayed entries data, described display closure element, described closure element;
Step S08:Terminate.
Described component identification also includes not showing start element mark, does not show that closure element identifies;
Accordingly, described step S02 also includes, if described component identification be described do not show start element identify, Execution step V1;If described component identification be described do not show closure element identify, execution step V2;
Step V1:Described host computer judge in described configuration file whether there is do not show start element condition value identify, It is not show that start element condition value mark obtains from described configuration file and do not show start element condition value according to described, Do not show that start element condition value tissue does not show start element and non-displayed entries data according to described, and do not show described Start element and described not displayed entries data preserve, and described component identification is updated to not show that closure element identifies, returns Step S02;Otherwise report an error, terminate;
Step V2:Described host computer judge in described configuration file whether there is do not show closure element condition value identify, It is not show that closure element condition value mark obtains from described configuration file and do not show closure element condition value according to described, Do not show that closure element condition value tissue does not show closure element and preserved according to described, described component identification is updated to Root knot bundle component identification, return to step S02;Otherwise report an error, terminate;
The element generating message in described step S07 also includes, and described does not show start element, described not show bar mesh number According to, described do not show closure element;Remove element also include, described do not show start element, described not displayed entries data, Described do not show closure element.
Also include before described step S01:
Step S01-1:Described host computer obtains conditional number, judges whether described conditional number is more than pre-conditioned number, is then Execution step S01;Otherwise end operation;
Also include before described step S08, update described conditional number, change and preserve described configuration file, close institute State configuration file, return to step S01-1.
Described change and preserve described configuration file, specifically,
Described start element condition value in the described host computer described configuration file of renewal and/or described display start unit Plain condition value and/or described display closure element condition value and/or described closure element condition value;
Described host computer updates described start element condition value in described configuration file, specifically, described host computer Root start element condition value is obtained from described configuration file according to described start element condition value mark, updates described and open Beginning element condition value, and as the root start element condition value after updating in described configuration file;
Described host computer updates the described display start element condition value in described configuration file, specifically, described upper Machine obtains display start element condition value according to described display start element condition value mark from described configuration file, updates institute State display start element condition value, and as the display start element condition value after updating in described configuration file;
Described host computer updates the described display closure element condition value in described configuration file, specifically, described upper Machine obtains display closure element condition value according to described display closure element condition value mark from described configuration file, updates institute State display closure element condition value, and as the display closure element condition value after updating in described configuration file;
Described host computer updates described closure element condition value in described configuration file, specifically, described host computer Root closure element condition value is obtained from described configuration file according to described closure element condition value mark, updates described root knot Shu Yuansu condition value, and as the root closure element condition value after updating in described configuration file.
Described tissue displayed entries data specifically,
Step M1:Described host computer obtains entry component identification from described configuration file;
Step M2:Judge described entry component identification type, if entry start element mark then execution step M3;As Fruit is the first label start element mark then execution step M4;If the first label closure element mark then execution step M5; If the second label start element mark then execution step M6;If the second label closure element mark then execution step M7;If entry closure element mark then execution step M8;If entry completes component identification then execution step M9;
Step M3:Described host computer judges that whether there is entry start element condition value in described configuration file identifies, and is Then entry start element condition value is obtained from described configuration file according to described entry start element condition value mark, according to institute State entry start element condition value tissue entry start element, and described entry start element is preserved, by described entry element Mark is updated to the first label start element mark, return to step M2;Otherwise report an error, terminate;
Step M4:Described host computer judges to whether there is the first label start element condition value mark in described configuration file Know, be, the first label start element is obtained from described configuration file according to described first label start element condition value mark Condition value, organizes the first label start element and the first text data according to described first label start element condition value, and will Described first label start element and described first text data preserve, and described entry component identification is updated to the first label knot Bundle component identification, return to step M2;Otherwise report an error, terminate;
Step M5:Described host computer judges to whether there is the first label closure element condition value mark in described configuration file Know, be, the first label closure element is obtained from described configuration file according to described first label closure element condition value mark Condition value, organizes the first label closure element according to described first label closure element condition value, and is preserved, by described bar Mesh component identification is updated to the second label start element mark, return to step M2;Otherwise report an error, terminate;
Step M6:Described host computer judges to whether there is the second label start element condition value mark in described configuration file Know, be, the second label start element is obtained from described configuration file according to described second label start element condition value mark Condition value, organizes the second label start element and the second text data according to described second label start element condition value, and will Described second label start element and described second text data preserve, and described entry component identification is updated to the second label knot Bundle component identification, return to step M2;Otherwise report an error, terminate;
Step M7:Described host computer judges to whether there is the second label closure element condition value mark in described configuration file Know, be, the second label closure element is obtained from described configuration file according to described second label closure element condition value mark Condition value, organizes the second label closure element and is preserved according to described second label closure element condition value, by described bar Mesh component identification is updated to entry and completes component identification, return to step M2;Otherwise report an error, terminate;
Step M8:Described host computer judges that whether there is entry closure element condition value in described configuration file identifies, and is Then entry closure element condition value is obtained from described configuration file according to described entry closure element condition value mark, according to institute State entry closure element condition value tissue entry closure element, and preserved, described entry component identification is updated to entry Complete component identification, return to step M2;Otherwise report an error, terminate;
Step M9:Remove described entry component identification, obtain described entry start element, described first label starts unit Element, described first label closure element, described second label start element, described second label closure element, described entry knot Shu Yuansu, using the data getting as entry data, removes described entry start element, described first label start element, Described first label closure element, described second label start element, described second label closure element, described entry terminate unit Element, terminates.
Described component identification also includes prefix component identification, preamble start element mark, preamble keyword component identification, sequence Speech closure element mark, suffix component identification;
Accordingly, also include in described step S02, if prefix component identification then execution step K1;If preamble Start element mark then execution step K2;If preamble keyword component identification then execution step K3;If preamble terminates Component identification then execution step K4;If described component identification is suffix component identification, execution step K5;
Step K1:Described host computer judges that whether there is prefix condition value in described configuration file identifies, and is then according to institute State prefix condition value mark and obtain prefix condition value from described configuration file, prefix information is organized according to described prefix condition value And preserved, described component identification is updated to preamble start element mark, return to step S02;Otherwise report an error, terminate;Institute State component identification and be initially prefix component identification;
Step K2:Described host computer judges to start condition value mark with the presence or absence of preamble in described configuration file, is then root Start condition value mark acquisition preamble from described configuration file according to described preamble and start condition value, bar is started according to described preamble Part value tissue preamble head data is simultaneously preserved, and described component identification is updated to preamble keyword component identification, return to step S02;Otherwise report an error, terminate;
Step K3:Described host computer judges that whether there is preamble key condition value in described configuration file identifies, and is then Described preamble key condition value is obtained from described configuration file according to described preamble key condition value mark, according to described Preamble key condition value tissue preamble keyword is simultaneously preserved, and described component identification is updated to preamble closure element mark Know, return to step S02;Otherwise report an error, terminate;
Step K4:Described host computer judges that whether there is preamble termination condition value in described configuration file identifies, and is then root Obtain preamble termination condition value according to described preamble termination condition value mark from described configuration file, bar is terminated according to described preamble Part value tissue preamble terminates data and is preserved, and described component identification is updated to root start element mark, return to step S02;Otherwise report an error, terminate;
Step K5:Described host computer judges that whether there is suffix condition value in described configuration file identifies, and is then according to institute State suffix condition value mark and obtain suffix condition value from described configuration file, suffix information is organized according to described suffix condition value And preserved, described component identification is updated to message and completes component identification, return to step S02;Otherwise report an error, terminate;
The element generating message in described step S07 also includes, described prefix information, described preamble head data, described sequence Speech keyword, described preamble terminate data, suffix information;The element removed also includes, described prefix information, described preamble head number According to, described preamble keyword, described preamble terminate data, described suffix information.
Beneficial effects of the present invention are, the message that can be automatically generated using the inventive method, need not manually be operated, Avoid artificial incorrect operation while saving human resourcess, improve the efficiency generating message.
Brief description
A kind of method flow diagram automatically generating message that Fig. 1 to Fig. 4 provides for embodiment 1;
A kind of method flow diagram of generation displayed entries data that Fig. 5 to Fig. 6 provides for embodiment 2.
Specific embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, complete Site preparation description is it is clear that described embodiment is only a part of embodiment of the present invention, rather than whole embodiments.It is based on Embodiment in the present invention, it is every other that those of ordinary skill in the art are obtained under the premise of not making creative work Embodiment, broadly falls into the scope of protection of the invention.
Embodiment 1
The embodiment of the present invention 1 provides a kind of method automatically generating message, can obtain mark for host computer from memory block Know, organize corresponding data and write caching according to identifying corresponding value, by the data write message in caching;Can also be, Host computer reads configuration file, organizes corresponding data and writes caching according to information default in configuration file, in caching Data write message, the method that above two technical scheme is realized is identical, and the present embodiment machine-readable takes configuration file, root with upper , as shown in Figures 1 to 4, specifically include to illustrate according to as a example information generation message default in configuration file:
Step 101:Host computer opens configuration file, reads component identification from configuration file;
Step 102:Host computer judges component identification type, if prefix component identification then execution step 103;If Preamble start element mark then execution step 107;If preamble keyword component identification then execution step 111;If sequence Speech closure element mark then execution step 117;If comment element mark then execution step 121;If root start element Mark then execution step 126;If comment element mark then execution step 130 after root;If display start element mark Then execution step 134;If display closure element mark then execution step 139;If not showing that start element identifies then Execution step 143;If not showing closure element mark then execution step 148;If root knot bundle component identification then executes Step 152;If suffix component identification then execution step 156;If message completes component identification execution step 160.Excellent Choosing, the component identification in configuration file is prefix component identification;
Step 103:Host computer identifies according to prefix condition number and obtains prefix condition number, execution step 104;
Also include before this step, host computer judges that whether there is prefix condition number in configuration file identifies, and is to execute Step 103;Otherwise report an error, terminate;
In the present embodiment, host computer obtains prefix condition number from configuration file and identifies corresponding value, by the value getting As prefix condition number;
For example, prefix condition number is designated PREFIXFNUM, and host computer gets PREFIXFNUM=2 from configuration file, As a example i.e. prefix condition number is equal to 2.
This step can also be that host computer points out user input prefix condition number, waits the front lacing of receiving user's input Number of packages.
Step 104:Judge that whether prefix condition number is more than 0, be then execution step 105;Otherwise terminate;
For example, prefix condition number is more than 0 for 2, execution step 105;
Step 105:Empty prefix element caching, prefix information is judged whether according to prefix condition value mark, is then Component identification is otherwise updated to preamble start element mark, return to step 102 by execution step 106;
Also include before this step, host computer judges that whether there is prefix condition value in configuration file identifies, and is to execute Step 105;Otherwise report an error, terminate.
In the present embodiment, host computer obtains prefix condition value from configuration file and identifies corresponding value, by the value getting As prefix condition value, prefix information is judged whether according to prefix condition value, if prefix condition value be more than 0 then it represents that There is prefix information;Otherwise represent there is not prefix information.
For example, prefix condition value is designated PREFIXFLAG0, and host computer reads PREFIXFLAG0=from configuration file 1, then equal to 1, there is prefix information, execution step 106 in expression to prefix condition value;
Step 106:Tissue prefix information is identified according to prefix condition value, and is written into prefix element caching, by element Mark is updated to preamble start element mark, return to step 102;
Preferably, host computer tissue less than 1024 bytes and comprises the random number of specified bytes as prefix letter Breath, wherein specified bytes are ' | ';
For example, the prefix information of host computer tissue 8 byte lengths is
888|12354312545|.
Step 107:Conditional number mark acquisition preamble is started according to preamble and starts conditional number, execution step 108;
Also include before this step, host computer judges to start conditional number mark with the presence or absence of preamble in configuration file, is then Execution step 107;Otherwise report an error, terminate;
In the present embodiment, host computer obtains preamble from configuration file and starts the conditional number corresponding value of mark, will get Value start conditional number as preamble, conditional number is started with preamble and is designated PREFACEFNUM, host computer obtains from configuration file Get as a example preamble starts conditional number PREFACEFNUM=3.
This step can also be that host computer prompting user input preamble starts conditional number, waits the sequence of receiving user's input Speech starts conditional number.
Step 108:Judge that preamble starts conditional number and whether is more than 0, be then execution step 109, otherwise update prefix condition Number, return to step 104;
Preferably, updating prefix condition number is that the result subtracting 1 by prefix condition number replaces original prefix condition number.
For example, the preamble getting starts conditional number and is more than 0 for 3, then execution step 109;
Step 109:Empty preamble start element caching, condition value mark is started according to preamble and judges whether preamble head Data, is then execution step 110;Otherwise component identification is updated to preamble keyword component identification, return to step 102;
Also include before this step, host computer judges to start condition value mark with the presence or absence of preamble in configuration file, is then Execution step 109;Otherwise report an error, terminate.
In the present embodiment, host computer obtains preamble from configuration file and starts the condition value corresponding value of mark, will get Value start condition value as preamble, condition value is started according to preamble and judges whether preamble head data, if preamble starts There is preamble head data more than 0 expression in condition value;Otherwise represent there is not preamble head data.
For example, preamble starts condition value and is designated PREFACEFLAG0, and host computer reads preamble from configuration file and opens Beginning condition value PREFACEFLAG0=2, represents there is preamble head data, execution step 110;
Step 110:Start condition value mark tissue preamble head data according to preamble, and be written into preamble start element to delay Deposit, component identification is updated to preamble keyword component identification, return to step 102;
In the present embodiment, condition value mark tissue preamble head data is started specifically, obtaining from configuration file according to preamble Preamble termination condition value is taken to identify corresponding preamble termination condition value, if preamble starts condition value is equal to 1, host computer is organized First preset value as preamble head data;If preamble starts condition value is equal to 2, host computer organizes the second preset value And as preamble head data;If preamble starts condition value is equal to other values, report an error, terminate.
First preset value by<,?, xml composition, wherein<With?There is at least one letter in character data and/or xml centre For capitalization, for example,<?Xml;Second preset value is<?xml;For example, host computer is from the beginning of the preamble that configuration file reads out Condition value PREFACEFLAG0=2, then organize<?Xml is written in preamble start element caching.
Step 111:Identified according to preamble key condition number and obtain preamble key condition number, execution step 112;
Also include before this step, host computer judges that whether there is preamble key condition number in configuration file identifies, and is Then execution step 111;Otherwise report an error, terminate;
In the present embodiment, host computer obtains preamble key condition number from configuration file and identifies corresponding value, will obtain The value arriving, as preamble key condition number, is designated KEYWORDTRUEFNUM with preamble key condition number, and host computer is from joining Put as a example getting preamble key condition number KEYWORDTRUEFNUM=5 in file.
This step can also be that host computer points out user input preamble key condition number, waits receiving user's input Key condition number.
Step 112:Judge that whether preamble key condition number is more than 0, be then execution step 113;Otherwise update preamble to open Beginning conditional number, return to step 108.
Preferably, update preamble to start conditional number is preamble is started the result that conditional number subtracts 1 to replace original preamble to open Beginning conditional number.
For example, the preamble key condition number getting is more than 0 for 5, execution step 113.
Step 113:Empty preamble keyword element caching, sequence is judged whether according to preamble key condition value mark Speech keyword, is then execution step 114, otherwise component identification is updated to preamble closure element mark, return to step 102;
Also include before this step, host computer judges that whether there is preamble key condition value in configuration file identifies, and is Then preamble key condition value is obtained from configuration file according to preamble key condition value mark;Otherwise report an error, terminate.
In the present embodiment, host computer obtains preamble key condition value from configuration file and identifies corresponding value, will obtain The value arriving, as preamble key condition value, judges whether preamble keyword according to preamble key condition value, such as infructescence Speech key condition value is more than 0 then it represents that there is preamble keyword, otherwise represents there is not preamble keyword.
For example, preamble key condition value is designated KEYWORDTRUEFLAG0, and host computer reads out from configuration file Preamble key condition value KEYWORDTRUEFLAG0=4 then it represents that there is preamble keyword, execution step 114.
Step 114:Host computer reads the coding in configuration file, calculation code count value according to code identification, executes step Rapid 115;
In the present embodiment, host computer obtains the corresponding value of code identification from configuration file, by the value getting according to point Split every symbol, using the character string being divided into as coding, and with coding count value, corresponding relation is set up to each coding, obtain Take the number of separator, the result that the number of separator is added 1 is as coding count value;Wherein coding can for utf-8, gbk, Gb2312 etc.;Code identification is CODE;Separator is ', ';When there is not code identification in configuration file, using default code For utf-8, now coding count value is 1;
For example, host computer gets CODE=utf-8, gbk, gb2312 from configuration file;The volume obtaining after then splitting Code is utf-8, gbk and gb2312, sets up corresponding relation to coding and coding count value, wherein, utf-8 and coding count value 3 Corresponding, gbk is corresponding with coding count value 2, and gb2312 is corresponding with coding count value 1.Initial code count value is 3.
Step 115:Judge that whether coding count value is more than 0, be then execution step 116;Otherwise update preamble key brief note Number of packages, return to step 112;
Step 116:According to preamble key condition value mark and coding count value corresponding coding tissue preamble keyword, And it is written into preamble keyword element caching, component identification is updated to preamble closure element mark, return to step 102;
In the present embodiment, preamble keyword includes attribute-name, equal sign, property value;Host computer obtains according to coding count value Corresponding coding, host computer identifies, according to preamble key condition value, the preamble keyword that organizational attribution value is coding.As infructescence Speech key condition value identifies corresponding preamble key condition value and is equal to 1, then host computer is organized the 3rd preset value and made For preamble keyword;If preamble key condition value is equal to 2, host computer is organized the 4th preset value and is closed as preamble Key word;If preamble key condition value is equal to 3, host computer organizes the 5th preset value and as preamble keyword;As Infructescence speech key condition value is equal to 4, then host computer organizes the 6th preset value and as preamble keyword;If preamble closes Key word condition value is equal to other values, then report an error, and terminates.
Specifically, preamble keyword by attribute-name ,=, property value form, host computer is according to encoding setting property value, attribute Entitled encoding;Taking be encoded to utf-8 as a example, the property value of corresponding host computer tissue is " utf-8 ", the 3rd preset value is In attribute-name, at least one letter is capitalization, for example, Encoding=" utf-8 ";
4th preset value be attribute-name and=between have character data, for example, encoding and=between have space, that is, encoding=”utf-8”;
5th preset value be=has character data and property value between, for example ,=there is space and property value between, that is, encoding=”utf-8”;
6th preset value is encoding=" utf-8 ";
For example, the preamble keyword KEYWORDTRUEFLAG0=4 that host computer reads from configuration file, then host computer Tissue preamble keyword is encoding=" utf-8 ", it is written into preamble keyword element caching.
Step 117:Identified according to preamble termination condition number and obtain preamble termination condition number, execution step 118;
Also include before this step, host computer judges that whether there is preamble termination condition number in configuration file identifies, and is then Execution step 117;Otherwise report an error, terminate;
In the present embodiment, host computer obtains preamble termination condition number from configuration file and identifies corresponding value, will get Value as preamble termination condition number, PENDREFACEFNUM is designated with preamble termination condition number, host computer is from configuration file In get preamble termination condition number PENDREFACEFNUM=3 as a example.
This step can also be that host computer points out user input preamble termination condition number, waits the sequence of receiving user's input Speech termination condition number.
Step 118:Judge that whether preamble termination condition number is more than 0, be then execution step 119;Otherwise update coding count Value, return to step 115;
In the present embodiment, with the data instance in step 115, the preamble termination condition number getting is more than 0 for 3, then holds Row step 119;
Preferably, updating preamble key condition number is that the result subtracting 1 by preamble key attribute conditional number is replaced originally Preamble key attribute conditional number.
Step 119:Empty preamble closure element caching, judge whether that preamble is tied according to preamble termination condition value mark Beam data, is then execution step 120;Otherwise component identification is updated comment element mark, return to step 102;
Also include before this step, host computer judges that whether there is preamble termination condition value in configuration file identifies, and is then Execution step 119;Otherwise report an error, terminate.
In the present embodiment, host computer obtains preamble termination condition value from configuration file and identifies corresponding value, will get Value as preamble termination condition value, judge whether that preamble terminates data according to preamble termination condition value, if preamble knot There is preamble more than 0 expression and terminate data in bundle condition value;Otherwise represent that there is not preamble terminates data.
For example, preamble termination condition value is designated PENDREFACEFLAG0, and host computer reads preamble from configuration file Termination condition value PENDREFACEFLAG0=2, represents that there is preamble terminates data, execution step 120;
Step 120:Tissue preamble is identified according to preamble termination condition value and terminates data, and be written into preamble closure element Caching, component identification is updated to comment element mark, return to step 102;
In the present embodiment, according to preamble termination condition value identify tissue preamble terminate data specifically,
Obtain preamble termination condition value and identify corresponding preamble condition value, if preamble termination condition value from configuration file Identify corresponding preamble termination condition value and be equal to 1, then host computer is organized the 7th preset value and terminated data as preamble;
If preamble termination condition value is equal to 2, host computer is organized the 8th preset value and is terminated data as preamble;
If preamble termination condition value is equal to other values, report an error, terminate;
Specifically, the 7th preset value be preamble keyword with>Between have character data>;
8th preset value be preamble keyword with>Between there is no character data>.
For example, the preamble termination condition value that host computer reads out from configuration file is equal to 2, then organize>, and it is written into sequence Speech closure element caching.
Step 121:Annotation conditional number, execution step 122 are obtained according to annotation conditional number mark;
Also include before this step, host computer judges to whether there is annotation conditional number mark in configuration file, is to execute Step 121;Otherwise report an error, terminate;
In the present embodiment, host computer obtains annotation conditional number from configuration file and identifies corresponding value, by the value getting As annotation conditional number, it is designated NOTETUREFNUM to annotate conditional number, get annotation conditional number NOTETUREFNUM=2 As a example.
This step can also be that host computer prompting user input annotates conditional number, waits the annotation bar of receiving user's input Number of packages.
Step 122:Judge that whether annotate conditional number is more than 0, be then execution step 123;Otherwise update preamble termination condition Number, return to step 118;
In the present embodiment, with the data instance in step 121, annotate conditional number and be more than 0 for 2, then execution step 123;
Preferably, preamble termination condition number is that the result subtracting 1 by preamble key condition number replaces original preamble key Brief note number of packages.
Step 123:Empty comment element caching, annotation information is judged whether according to annotation condition value, is to execute Step 124;Otherwise execution step 125;
Also include before this step, host computer judges to whether there is annotation condition value mark in configuration file, is to execute Step 123;Otherwise report an error, terminate.
In the present embodiment, host computer obtains annotation condition value from configuration file and identifies corresponding value, by the value getting As annotation condition value, annotation information is judged whether according to annotation condition value, if annotation condition value is more than 0, represents and deposit In annotation information, otherwise represent there is not annotation information;
For example, annotation condition value is designated NOTETUREFLAG0, the annotation condition that host computer reads out from configuration file Value NOTETUREFLAG0=2 then it represents that there is annotation information, execution step 124;
Step 124:According to annotation condition value mark organizing annotations information, and it is written into comment element caching, execute step Rapid 125;
In the present embodiment, according to annotation condition value mark organizing annotations information specifically, obtaining annotation from configuration file Condition value identifies corresponding annotation condition value, if annotation condition value is equal to 1, host computer is organized the 9th preset value and made For annotation information;
If annotation condition value is equal to 2, host computer organizes the tenth preset value and as annotation information;
If annotation condition value is equal to other values, report an error, terminate;
Specifically, annotation information be with<!As start element, with>As end data, start element and closure element Middle is notes content, and notes content can be made up of any character data, the 9th preset value be with<!As start element, with >As terminating data, wherein<With!Between have character data, for example,<@!8888888>;
Tenth preset value be with<!As start element, with>As end data,<With!Centre does not have character data, that is, <!8888888>;
With the data instance in step 123, the annotation condition value that host computer reads out from configuration file is equal to 2, upper Machine organizes the tenth preset value and as annotation information<!8888888>, it is written into comment element caching;
Step 125:Component identification is updated to root start element mark, return to step 102;
Step 126:Identified according to root start element conditional number and obtain root start element conditional number, execution step 127;
Also include before this step, host computer judges that whether there is root start element conditional number in configuration file identifies, and is Then execution step 126;Otherwise report an error, terminate;
In the present embodiment, root start element conditional number is designated ROOTTRUEFNUM, and host computer obtains from configuration file The value of ROOTTRUEFNUM, using the value of the ROOTTRUEFNUM getting as root start element conditional number, with the root getting As a example start element conditional number is equal to 2.
This step can also be that host computer notifies user input root start element conditional number, waits receiving user's input Root start element conditional number.
Step 127:Judge that whether root start element conditional number is more than 0, be then execution step 128;Otherwise update annotation bar Number of packages, return to step 122;
Preferably, updating annotation conditional number is that the result subtracting 1 by annotation conditional number replaces original annotation conditional number.
For example, root start element conditional number is more than 0 for 2, execution step 128.
Step 128:Empty root start element caching, judge whether that root starts according to root start element condition value mark Element, is then execution step 129;Otherwise component identification is updated to comment element mark, return to step 102 after root;
Also include before this step, host computer judges that whether there is root start element condition value in configuration file identifies, and is Then execution step 128;Otherwise report an error, terminate.
In the present embodiment, host computer obtains root start element condition value from configuration file and identifies corresponding value, will obtain The value arriving, as root start element condition value, judges whether root start element according to root start element condition value, if root There is root start element more than 0 expression in start element condition value;Otherwise represent there is not root start element.
For example, root start element condition value is designated ROOTTRUEFLAG0, and host computer reads root from configuration file and opens Beginning element condition value ROOTTRUEFLAG0=2, execution step 129.
Step 129:Tissue root start element is identified according to root element condition value, and is written into root start element caching, Component identification is updated to comment element mark, return to step 102 after root;
In the present embodiment, tissue root start element is identified according to root element condition value specifically, obtaining from configuration file Root element condition identity corresponding root element condition value, if root element condition value identifies corresponding start element condition value etc. In 1, then host computer organizes the 11st preset value and as root start element;
If root start element condition value is equal to 2, host computer is organized the 12nd preset value and is started unit as root Element;
If root start element condition value is equal to other values, report an error, terminate;
Specifically, the 11st preset value be with<As root start element,>As root closure element, root start element and root There is T in the middle of closure element, and between root start element and T, have character data, for example,<TT>;
12nd preset value is<T>.
For example, host computer reads root start element condition value from configuration file
ROOTTRUEFLAG0=2, then host computer organize the 12nd preset value as root start element<T>, and will In its write root start element caching;
Step 130:Obtained according to annotation conditional number mark after root element and after root element, annotate conditional number, execution step 131;
Also include before this step, host computer judges to whether there is annotation conditional number mark after root element in configuration file, It is then execution step 130;Otherwise report an error, terminate;
Concrete operations are identical with step 121, repeat no more.
In the present embodiment, taking annotate conditional number after getting root element and be equal to 2 as a example.
This step can also be to annotate conditional number after host computer prompting user input root element, wait receiving user's input Root element after annotate conditional number.
Step 131:Judge whether annotation conditional number is more than 0 after root element, be then execution step 132;Otherwise more new root is opened Beginning element conditional number, return to step 127;
Preferably, more new root start element conditional number is that the result subtracting 1 by root start element conditional number replaces original root Start element conditional number.
For example, after root element, annotation conditional number is equal to 2, execution step 132.
Step 132:Empty comment element caching after root, judge whether to note according to annotation condition value mark after root element Release information, be then execution step 133;Otherwise component identification is updated to show start element mark, return to step 102;
Also include before this step, host computer judges to whether there is annotation condition value mark after root element in configuration file, It is then execution step 132;Otherwise report an error, terminate.
Concrete operations are identical with step 123, repeat no more.
Step 133:According to annotation condition value mark organizing annotations information after root element, and it is written into comment element after root Caching, component identification is updated to show start element mark, return to step 102;
In the present embodiment, the method for organizing annotations information is identical with step 124, repeats no more.
Step 134:Display start element conditional number, execution step 135 are obtained according to display start element conditional number mark;
Also include before this step, host computer judges to whether there is display start element conditional number mark in configuration file, It is then execution step 134;Otherwise report an error, terminate.
In the present embodiment, host computer obtains display start element conditional number from configuration file and identifies corresponding value, will obtain The value got, as display start element conditional number, to show that start element conditional number is designated DTRUEFNUM, gets display As a example start element conditional number DTRUEFNUM=2.
This step can also be that host computer prompting user input shows start element conditional number, waits receiving user's input Display start element conditional number.
Step 135:Judge to show that whether start element conditional number is more than 0, be then execution step 136;Otherwise more new root unit Conditional number, return to step 131 is annotated after element;
Preferably, after updating root element, annotation conditional number is that the result subtracting 1 by annotation conditional number after root element is replaced originally Root element after annotate conditional number.
For example, display start element conditional number is more than 0 for 2, then execution step 136.
Step 136:Empty display start element caching, judge whether to show according to display start element condition value mark Show start element, be then execution step 137;Otherwise component identification is updated to show closure element mark, return to step 102;
Also include before this step, host computer judges to whether there is display start element condition value mark in configuration file, It is then execution step 136;Otherwise report an error, terminate.
In the present embodiment, host computer obtains display start element condition value from configuration file and identifies corresponding value, will obtain According to display start element condition value, the value got, as display start element condition value, judges whether that display starts unit Element, if display start element condition value is more than 0, represents there is display start element, otherwise represents that there is not display starts unit Element.
For example, display start element condition value is designated DTRUEFLAG0, and host computer reads out display from configuration file As a example start element condition value DTRUEFLAG0=2, represent there is display start element, execution step 137.
Step 137:According to display start element condition value mark tissue display start element, organize displayed entries data, Execution step 138;
In the present embodiment, according to display start element condition value mark tissue display start element specifically, from configuration literary composition Obtain the corresponding display of display start element condition value mark in part and start condition value, if display start element condition value is equal to 1, then host computer organize the 13rd preset value and as display start element;
If display start element condition value is equal to 2, host computer is organized the 14th preset value and is opened as display Beginning element;
If display start element condition value is equal to other values, report an error, terminate.
Specifically, the 13rd preset value be with<As start element, with>As closure element, start element and end unit For there being character data between D, and start element and D in the middle of element, for example,<dD>;
14th preset value is<D>;
With the data instance in step 136, show that start element condition value is equal to 2, host computer tissue display start element For<D>;
Generating displayed entries data is
Step 138:Start element and displayed entries data write display start element caching will be shown, by component identification more New is display closure element mark, return to step 102;
Step 139:Display closure element conditional number, execution step 140 are obtained according to display closure element conditional number mark;
Also include before this step, host computer judges to whether there is display closure element conditional number mark in configuration file, It is then execution step 140;Otherwise report an error, terminate;
This step can also be that host computer prompting user input shows closure element conditional number, waits receiving user's input Display closure element conditional number.
In the present embodiment, host computer obtains display closure element conditional number from configuration file and identifies corresponding value, will obtain The value got, as display closure element conditional number, to show that closure element conditional number is designated DENDTRUEFNUM, gets Display closure element conditional number DENDTRUEFNUM=2 as a example.
Step 140:Judge to show that whether closure element conditional number is more than 0, be then execution step 141;Otherwise update display Start element conditional number, return to step 135;
Preferably, updating display start element conditional number is that the result subtracting 1 by display start element conditional number is replaced originally Display start element conditional number.
For example, display closure element conditional number is more than 0 for 2, then execution step 141;
Step 141:Empty display closure element caching, judge whether to show according to display closure element condition value mark Show closure element, be then execution step 142;Otherwise component identification is updated to not show that start element identifies, return to step 102;
Also include before this step, host computer judges to whether there is display closure element condition value mark in configuration file, It is then execution step 141;Otherwise report an error, terminate.
In the present embodiment, host computer obtains display closure element condition value from configuration file and identifies corresponding value, will obtain According to display closure element condition value, the value got, as display closure element condition value, judges whether that display terminates unit Element, if display closure element condition value is more than 0 then it represents that there is display closure element, otherwise represents that there is not display terminates Element;
For example, display closure element condition value is designated DENDTRUEFLAG0, and host computer reads aobvious from configuration file Show closure element condition value DENDTRUEFLAG0=2, represent there is display closure element, execution step 142;
Step 142:Closure element is shown according to display closure element condition value mark tissue, and is written into display and terminate Element caches, and component identification is updated to not display elements mark, return to step 102;
In the present embodiment, according to display closure element condition value mark tissue display closure element specifically, from configuration literary composition Display closure element condition value mark corresponding display closure element condition value is obtained, if display closure element condition value in part Equal to 1, then host computer organizes the 15th preset value and as display closure element;
If display closure element condition value is equal to 2, host computer organizes the 16th preset value and as display knot Shu Yuansu;
If display closure element condition value is equal to other values, report an error, terminate.
Specifically, the 15th preset value be with</ as start element, with>As closure element, start element and end In the middle of element for have between D, and start element and D character data and/or<And/between have character data, for example,</D>;
16th preset value is</D>;
For example, the display closure element condition value DENDTRUEFLAG0=2 that host computer reads out from configuration file, then go up Position machine tissue</D>, and be written into showing closure element caching;
Step 143:Do not show start element conditional number, execution step according to not showing that start element conditional number mark obtains 144;
Also include before this step, host computer judge in configuration file whether there is do not show start element conditional number mark Know, be then execution step 143;Otherwise report an error, terminate.
In the present embodiment, host computer obtains from configuration file and does not show that start element conditional number identifies corresponding value, will The value getting as not showing start element conditional number, not show that start element conditional number is designated ETRUEFNUM, obtains To do not show start element conditional number be equal to 2 as a example;
This step can also be that host computer prompting user input does not show start element conditional number, waits receive user defeated Enter does not show start element conditional number.
Step 144:Judge not showing that whether start element conditional number is more than 0, be then execution step 145;Otherwise update aobvious Show closure element conditional number, return to step 140;
Preferably, updating display closure element conditional number is that the result subtracting 1 by display closure element conditional number is replaced originally Display closure element conditional number.
With the data instance in step 143, do not show that start element conditional number is more than 0 for 2, then execution step 145;
Step 145:Empty and do not show that start element caches, judge whether to deposit according to not showing that start element condition value identifies Not showing start element, it is then execution step 146;Otherwise component identification is updated to not show that closure element identifies, returns Step 102;
Also include before this step, host computer judge in configuration file whether there is do not show start element condition value mark Know, be then execution step 145;Otherwise report an error, terminate.
In the present embodiment, host computer obtains from configuration file and does not show that start element condition value identifies corresponding value, will The value getting as not showing start element condition value, according to not showing that start element condition value judges whether not show Start element, if do not show that start element condition value is more than 0 and does not show start element then it represents that existing;Otherwise represent and do not deposit Do not showing start element.
For example, do not show that start element condition value is designated ETRUEFLAG0, do not show start element condition value ETRUEFLAG0=2, represents that presence does not show start element, execution step 146;
Step 146:Do not show start element according to not showing that start element condition value mark is organized, tissue not displayed entries Data, execution step 147;
In the present embodiment, according to not showing that start element condition value mark tissue do not show start element specifically, from joining Put obtain in file do not show start element condition value mark corresponding do not show start element condition value, start if do not shown Element condition value is equal to 1, then host computer organizes the 17th preset value and as not showing start element;
If not showing that start element condition value is equal to 2, host computer organizes the 18th preset value and as not showing Show start element;
If not showing that start element condition value is equal to other values, reporting an error, terminating.
Specifically, the 17th preset value be with<As start element, with>As closure element, start element and end unit There is E in the middle of element, and between start element and E, have character data, for example,<eE>;18th preset value is<E>;
For example, what host computer got from configuration file does not show start element condition value ETRUEFLAG0=2, then group Knit<E>;The method organizing not displayed entries data is identical with step 138, repeats no more..
For example, the not displayed entries data of generation is,
Step 147:To not show that start element and the write of non-displayed entries data do not show that start element caches, by element Mark is updated to not show that closure element identifies, return to step 102;
Step 148:Do not show closure element conditional number, execution step according to not showing that closure element conditional number mark obtains 149;
Also include before this step, host computer judge in configuration file whether there is do not show closure element conditional number mark Know, be then execution step 148;Otherwise report an error, terminate.
In the present embodiment, host computer obtains from configuration file and does not show that closure element conditional number identifies corresponding value, will The value getting as not showing closure element conditional number, not show that closure element conditional number is designated EENDTRUEFNUM, Get do not show closure element conditional number EENDTRUEFNUM=2 as a example.
This step can also be that host computer prompting user input does not show closure element conditional number, waits receive user defeated Enter does not show closure element conditional number.
Step 149:Judge not showing that whether closure element conditional number is more than 0, be then execution step 150;Otherwise update not Display start element conditional number, return to step 144;
Preferably, update and do not show that start element conditional number is not shown that the result that start element conditional number subtracts 1 is replaced Originally do not show start element conditional number;
For example, do not show that closure element conditional number is more than 0 for 2, then execution step 150;
Step 150:Empty and do not show that closure element caches, judge whether to deposit according to not showing that closure element condition value identifies Not showing closure element, it is then execution step 151;Otherwise component identification is updated to root knot bundle component identification, return to step 102;
Also include before this step, host computer judge in configuration file whether there is do not show closure element condition value mark Know, be then execution step 150;Otherwise report an error, terminate.
In the present embodiment, host computer obtains from configuration file and does not show that closure element condition value identifies corresponding value, will The value getting as not showing closure element condition value, according to not showing that closure element condition value judges whether not show Closure element, if do not show that closure element condition value is more than 0 and does not show closure element then it represents that existing;Otherwise represent and do not deposit Do not showing closure element;
For example, do not show that closure element condition value is designated EENDTRUEFLAG0, host computer reads from configuration file Do not show closure element condition value EENDTRUEFLAG0=2, represent to exist and do not show closure element, execution step 151;
Step 151:Do not show closure element according to not showing that closure element condition value mark is organized, and be written into not showing Show that closure element caches, component identification is updated to root knot bundle component identification, return to step 102;
In the present embodiment, according to not showing that closure element condition value mark tissue do not show closure element specifically, from joining Put obtain in file do not show closure element condition value mark corresponding do not show closure element condition value, terminate if do not shown Element condition value is equal to 1, then host computer organizes the 19th preset value and as not showing closure element;If not showing knot Shu Yuansu condition value is equal to 2, then host computer organizes the 20th preset value and as not showing closure element;If do not shown Closure element condition value is equal to other values, then report an error, and terminates.
Specifically, the 19th preset value be with</ as start element, with>As closure element, start element and end In the middle of element for have between E, and start element and E character data and/or<And/between have character data, for example,</EE>;
20th preset value is</E>;
For example, host computer reads from configuration file and does not show closure element condition value EENDTRUEFLAG0=2, then go up Position machine tissue</E>, and be written into not showing that closure element caches.
Step 152:Identified according to root closure element conditional number and obtain root closure element conditional number, execution step 153;
Also include before this step, host computer judges that whether there is root closure element conditional number in configuration file identifies, and is Then execution step 152;Otherwise report an error, terminate.
In the present embodiment, host computer obtains root closure element conditional number from configuration file and identifies corresponding value, will obtain The value arriving, as root closure element conditional number, is designated TENDTRUEFNUM with root closure element conditional number, obtains root knot Shu Yuan As a example plain conditional number is equal to 2.
This step can also be that host computer points out user input root closure element conditional number, waits receiving user's input Root closure element conditional number.
Step 153:Judge that whether root closure element conditional number is more than 0, be then execution step 154;Otherwise update and do not show Closure element conditional number, return to step 149;
Preferably, update and do not show that closure element conditional number is not shown that the result that closure element conditional number subtracts 1 is replaced Originally do not show closure element conditional number.For example, root closure element conditional number is more than 0 for 2, then execution step 154;
Step 154:Empty root closure element caching, root knot bundle is judged whether according to root closure element condition value mark Element, is then execution step 155;Otherwise component identification is updated to suffix component identification, return to step 102;
Also include before this step, host computer judges that whether there is root closure element condition value in configuration file identifies, and is Then execution step 154;Otherwise report an error, terminate.
In the present embodiment, host computer obtains root closure element condition value from configuration file and identifies corresponding value, will obtain The value arriving is as root closure element condition value, if judging whether root closure element root knot according to root closure element condition value Shu Yuansu condition value is more than 0 then it represents that there is root closure element;Otherwise represent there is not root closure element.
For example, root closure element condition value is designated TENDTRUEFLAG0, and host computer reads out root knot from configuration file Shu Yuansu condition value TENDTRUEFLAG0=2, represents there is root closure element, execution step 155;
Step 155:Tissue root closure element is identified according to root closure element condition value, and is written into root closure element and delay Deposit, component identification is updated to suffix component identification, return to step 102;
In the present embodiment, tissue root closure element is identified specifically, from configuration file according to root closure element condition value Obtain root closure element condition value and identify corresponding closure element condition value, if root closure element condition value mark is corresponding Root closure element condition value is equal to 1, then host computer organizes the 21st preset value and as root closure element;
If root closure element condition value is equal to 2, host computer organizes the 22nd preset value and as root knot bundle Element;
If root closure element condition value is equal to other values, report an error, terminate.
Specifically, the 21st preset value be with</ as start element,>As closure element, start element and end Have T in the middle of element, and start element and/between have between character data and/or/and capital T and have character data, example As,</TT>;
22nd preset value is</T>;
For example, root closure element condition value TENDTRUEFLAG0=2, host computer is organized</T>, it is written into root knot Shu Yuan Element caching.
Step 156:Identified according to suffix conditional number and obtain suffix conditional number, execution step 157;
Also include before this step, host computer judges that whether there is suffix conditional number in configuration file identifies, and is to execute Step 156;Otherwise report an error, terminate.
In the present embodiment, host computer obtains suffix conditional number from configuration file and identifies corresponding value, by the value getting As suffix conditional number, lacing number of packages is designated POSTFIXFNUM later, the rear lacing that host computer gets from configuration file As a example number of packages POSTFIXFNUM=2.
This step can also be that host computer points out user input suffix conditional number, waits the rear lacing of receiving user's input Number of packages.
Step 157:Judge that whether suffix conditional number is more than 0, be then execution step 158;Otherwise update root closure element bar Number of packages, return to step 153;
Preferably, updating root closure element conditional number is that the result subtracting 1 by coding count value replaces original coding count Value.
For example, suffix conditional number is more than 0 for 2, execution step 158.
Step 158:Empty suffix element caching, suffix information is judged whether according to suffix condition value mark, is then Execution step 159;Otherwise component identification is updated to message and completes component identification, return to step 102;
Also include before this step, host computer judges that whether there is suffix condition value in configuration file identifies, and is to execute Step 155;Otherwise report an error, terminate.
In the present embodiment, host computer obtains suffix condition value from configuration file and identifies corresponding value, by the value getting As suffix condition value, suffix information is judged whether according to suffix condition value, if suffix condition value is more than 0, represents and deposit In suffix information, otherwise represent there is not suffix information;
For example, suffix condition value is designated POSTFIXFLAG0, and host computer reads suffix condition value from configuration file POSTFIXFLAG0=1, represents there is suffix information, execution step 159.
Step 159:Tissue suffix information is identified according to suffix condition value, and is written into suffix element caching, by element Mark is updated to message and completes component identification, return to step 102;
In the present embodiment, tissue suffix information is identified according to suffix condition value specifically, obtaining suffix from configuration file Condition value identifies corresponding suffix condition value, if suffix condition value is equal to 1, host computer organizes suffix information;If suffix Condition value is equal to other values, then report an error, and terminates.Suffix information can be random number.
For example, the suffix information of host computer tissue is, Timestamp=1322472806781 is written into suffix element Caching;
Step 160:Obtain the data in all cachings and be written into message, update suffix conditional number, remove element mark Know, return to step 157.
In the present embodiment, successively from prefix element cache to suffix element cache obtain data, by the data getting according to Secondary write message.
It should be noted that in embodiment of the present invention, after reporting an error can also be, empty all cachings, remove element Mark;
Embodiment 2
The method generating displayed entries data is identical with the method generating not displayed entries data, and the embodiment of the present invention is one Plant the method generating displayed entries data, as shown in Figure 5 and Figure 6, comprise the steps,
Step a01:Host computer obtains entry component identification from configuration file;
Step a02:Judge entry component identification type, if entry start element mark, then execution step a03;As Fruit is the first label start element mark, then execution step a07;If the first label closure element mark, then execution step a11;If the second label start element mark, then execution step a15;If the second label closure element mark, then hold Row step a19;If entry closure element mark, then execution step a23;If entry completes component identification, then execute Step a27;
In the present embodiment, the entry component identification value in configuration file identifies for entry start element.
Step a03:Identified according to entry start element conditional number and obtain entry start element conditional number;
Also include before this step, host computer judges that whether there is entry start element condition value in configuration file identifies, It is then execution step a03;Otherwise report an error, terminate.
In the present embodiment, host computer obtains entry start element conditional number from configuration file and identifies corresponding value, will obtain The value got, as entry start element conditional number, is designated MCOUNT with entry start element conditional number, the entry getting As a example start element conditional number MCOUNT=1, execution step a04;
This step can also be that host computer points out user input entry start element conditional number, waits entry to be received to start Element conditional number.
Step a04:Judge that whether entry start element conditional number is more than 0, be then execution step a05;Otherwise end operation.
In the present embodiment, with the data instance in step a03, entry start element conditional number is more than 0 for 1, execution step a05.
Step a05:Empty entry start element caching, bar is judged whether according to entry start element condition value mark Mesh start element, is then execution step a06;Otherwise entry component identification is updated to the first label start element mark, returns Step a02;
Also include before this step, host computer judges that whether there is entry start element condition value in configuration file identifies, It is then execution step a05;Otherwise report an error, terminate.
In the present embodiment, host computer obtains entry start element condition value from configuration file and identifies corresponding value, will obtain The value got is as entry start element condition value, if entry start element condition value starts then it represents that there is entry more than 0 Element;Otherwise represent there is not entry start element;
MFORMFLAG0 is designated with entry start element condition value, entry start element condition value MFORMFLAG0=2 is Example, execution step a06.
Step a06:Tissue entry start element is identified according to entry start element condition value, and is written into entry and start Element caches, and entry component identification is updated to the first label start element mark, return to step a02;
In the present embodiment, according to entry start element condition value identify tissue entry start element specifically, from configuration literary composition Obtain entry start element condition value in part and identify corresponding entry start element condition value, if entry start element condition value Equal to 1, then host computer organizes the 23rd preset value and as entry start element;If entry start element condition value Equal to 2, then host computer organizes the 24th preset value and as entry start element;If entry start element condition value Equal to other values, then report an error, terminate.
Wherein, the 23rd preset value be with<As start element, with>As closure element, start element and end unit It is lower case m in the middle of element, that is,<m>;24th preset value is<M>;
With the data instance in step a05, entry start element condition value MFORMFLAG0=2, host computer tissue the 20th Four preset values as entry start element<M>.
Step a07:First label start element conditional number, execution are obtained according to the first label start element conditional number mark Step a08;
Also include before this step, host computer judges to whether there is the first label start element conditional number mark in configuration file Know;It is then execution step a07;Otherwise report an error, terminate.
In the present embodiment, host computer obtains the first label start element conditional number from configuration file and identifies corresponding value, Using the value getting as the first label start element conditional number, it is designated with the first label start element conditional number TAG1FNUM, as a example the first label start element conditional number TAG1FNUM=5;Preferably, the first label is TAG label;
This step can also be that host computer points out user input the first label start element conditional number, waits to be received first Label start element conditional number.
Step a08:Judge that whether the first label start element conditional number is more than 0, be then execution step a09;Otherwise update Entry start element conditional number, return to step a04;
In the present embodiment, with the data instance in step a07, the first label start element condition data is more than 0 for 5, holds Row step a09;
Step a09:Empty the first label start element caching, identifying judgement according to the first label start element condition value is No presence the first label start element, is then execution step a10;Otherwise entry component identification is updated to the first label and terminates unit Element mark, return to step a02;
Also include before this step, host computer judges to whether there is the first label start element condition value mark in configuration file Know, be then execution step a09;Otherwise report an error, terminate.
In the present embodiment, host computer obtains the value of the first label start element condition value mark from configuration file, will obtain The value got as the first label start element condition value, if display the first label start element condition value be more than 0 then it represents that There is the first label start element;Otherwise represent there is not the first label start element.
TAG1FLAG0 is designated with the first label start element condition value, shows the first label start element condition value As a example TAG1FLAG0=2, execution step a10;
Step a10:According to first label start element condition value mark tissue the first label start element, tissue first literary composition Notebook data, and by the first label start element and the first text data write the first label start element caching, by entry element Mark is updated to the first label closure element mark, return to step a02;
In the present embodiment, according to first label start element condition value mark tissue the first label start element specifically, Obtain the first label start element condition value and identify corresponding first label start element condition value from configuration file, if the One label start element condition value is equal to 1, then host computer is organized the 25th preset value and started unit as the first label Element;If the first label start element condition value is equal to 2, host computer organizes the 26th preset value and as the first mark Sign start element;If the first label start element condition value is equal to 3, host computer is organized the 27th preset value and is made For the first label start element;If the first label start element condition value is equal to 4, host computer organizes the 28th preset value And as the first label start element;If the first label start element condition value is equal to other values, report an error, terminate.
Wherein, the 25th preset value is<K>;Or, the 25th preset value be with<As start element,>As knot It is character data and lower case k in the middle of Shu Yuansu, start element and closure element, character data includes space, for example,<k>;
26th preset value is<k>;27th preset value be with<K;28th preset value is<k;With step a09 In data instance, the first label start element condition value TAG1FLAG0=2, then host computer organize the 26th preset value<k>, And as the first label start element.
Step a11:First label closure element conditional number, execution are obtained according to the first label closure element conditional number mark Step a12;
Also include before this step, host computer judges to whether there is the first label closure element conditional number mark in configuration file Know, be then execution step a11;Otherwise report an error, terminate.
In the present embodiment, host computer obtains the first label closure element conditional number from configuration file and identifies corresponding value, Using the value getting as the first label closure element conditional number, it is designated with the first label closure element conditional number TAG1ENDFNUM, as a example the first label closure element conditional number TAG1ENDFNUM=5;
This step can also be that host computer points out user input the first label closure element conditional number, waits to be received first Label closure element conditional number;
Step a12:Judge that whether the first label closure element conditional number is more than 0, be then execution step a13;Otherwise update First label start element conditional number, return to step a08;
Preferably, updating the first label start element conditional number is the result subtracting 1 by the first label start element conditional number Replace the first original label start element conditional number.
In the present embodiment, with the data instance in step a11, the first label closure element conditional number is more than 0 for 5, execution Step a13;
Step a13:Empty the first label closure element caching, identifying judgement according to the first label closure element condition value is No presence the first label closure element, is then execution step a14;Otherwise entry component identification is updated to the second label and starts unit Element mark, return to step a02;
Also include before this step, host computer judges to whether there is the first label closure element condition value mark in configuration file Know, be then execution step a13;Otherwise report an error, terminate.
In the present embodiment, host computer obtains the first label closure element condition value from configuration file and identifies corresponding value, Using the value getting as the first label closure element condition value, if the first label closure element condition value be more than 0 then it represents that There is the first label closure element, otherwise represent there is not the first label closure element;
TAG1ENDFLAG is designated with the first label closure element condition value, the first label closure element condition value As a example TAG1ENDFLAG=2, represent there is the first label closure element, execution step a14.
Step a14:According to first label closure element condition value mark tissue the first label closure element, and it is written into First label closure element caching, entry component identification is updated to the second label start element mark, return to step a02;
In the present embodiment, according to first label closure element condition value mark tissue the first label closure element specifically, Obtain the first label closure element condition value and identify corresponding first label closure element condition value from configuration file, if the One label closure element condition value is equal to 1, then host computer is organized the 29th preset value and terminated unit as the first label Element;If the first label closure element condition value is equal to 2, host computer organizes the 30th preset value and as the first label Closure element;If the first label closure element condition value be equal to 3, host computer organize the 31st preset value and as First label closure element;If the first label closure element is equal to 4, host computer is organized the 32nd preset value and is made For the first label closure element;If the first label closure element is equal to other values, report an error, terminate;
Wherein, the 29th preset value be with</ as start element,>As closure element, start element and end unit Element in the middle of have capital K and/or<With/centre has in the middle of character data and/or K character data, for example,</K>;The 30 preset values are</k>;31st preset value be/with>Between have character data, for example ,/with>There is space centre ,/>;The 32 preset values be/with>Between there is no character data, that is,/>;
With the data instance in step a13, the first label closure element condition value TAG1ENDFLAG=2, host computer is organized 30th preset value</k>The first label closure element, be written into first label closure element caching.
Step a15:Second label start element conditional number, execution are obtained according to the second label start element conditional number mark Step a16;
Also include before this step, host computer judges to whether there is the second label start element conditional number mark in configuration file Know, be then execution step a15;Otherwise report an error, terminate.
In the present embodiment, host computer obtains the second label start element conditional number from configuration file and identifies corresponding value, Using the value getting as the second label start element conditional number, with the second label start element conditional number VALUE1TRUEFNUM As a example=5;Preferably, the second label is Value label.
This step can also be that host computer points out user input the second label start element conditional number, waits to be received second Label start element conditional number.
Step a16:Judge that whether the second label start element conditional number is more than 0, be then execution step a17;Otherwise update First label closure element conditional number, return to step a12;
Preferably, updating the first label closure element conditional number is the result subtracting 1 by the first label closure element conditional number Replace the first original label closure element conditional number;
With the data instance in step a15, the second label start element conditional number is more than 0 for 5, execution step a17;
Step a17:Empty the second label start element caching, identifying judgement according to the second label start element condition value is No presence the second label start element, is then execution step a18;Otherwise entry component identification is updated to the second label and terminates unit Element mark, return to step a02;
Also include before this step, host computer judges to whether there is the second label start element condition value mark in configuration file Know, be then execution step a17;Otherwise report an error, terminate.
In the present embodiment, host computer obtains the second label start element condition value from configuration file and identifies corresponding value, Using the value getting as the second label start element condition value, if the second label start element condition value be more than 0 then it represents that There is the second label start element;Otherwise represent there is not the second label start element;
VALUE1TRUEFLAG0 is designated with the second label start element condition value, the second label start element condition value Then it represents that there is the second label start element, execution step a18 in VALUE1TRUEFLAG0=2;
Step a18:According to second label start element condition value mark tissue the second label start element, tissue second literary composition Notebook data, and it is written into the second label start element caching, entry component identification is updated to the second label closure element mark Know, return to step a02;
In the present embodiment, according to second label start element condition value mark tissue the second label start element specifically, Obtain the second label start element condition value and identify corresponding second label start element condition value from configuration file, if the Two label start element condition values are equal to 1, then host computer is organized the 33rd preset value and started unit as the second label Element;If the second label start element condition value is equal to 2, host computer organizes the 34th preset value and as the second mark Sign start element;If the second label start element condition value is equal to 3, host computer is organized the 35th preset value and is made For the second label start element;If the second label start element condition value is equal to 4, host computer organizes the 36th preset value And as the second label start element;If the second label start element condition value is equal to other values, report an error, terminate.
Wherein, the 33rd preset value be with<As start element,>As closure element, start element and closure element Middle is lower case v, and<There is character data and v between, or be capital V in the middle of start element and closure element, For example,<V>;34th preset value is<v>;35th preset value be with<As start element,>As closure element, open It is lower case v in the middle of beginning element and closure element, and<There is character data and v between;Or start element and closure element Middle is capital V, for example<There is space with the middle of v,<v;
In 36th preset value v be lower case and<There is no character data and v between, that is,<v;
With the data instance in step a17, the second label start element condition value VALUE1TRUEFLAG0=2, then organize 34th preset value<v>The second label start element;
Step a19:Second label closure element conditional number, execution are obtained according to the second label closure element conditional number mark Step a20;
Also include before this step, host computer judges to whether there is the second label closure element conditional number mark in configuration file Know, be then execution step a19;Otherwise report an error, terminate.
In the present embodiment, host computer obtains the second label closure element conditional number from configuration file and identifies corresponding value, Using the value getting as the second label closure element conditional number, it is designated with the second label closure element conditional number VALUE1ENDFNUM, as a example the second label closure element conditional number is equal to 5;
This step can also be that host computer points out user input the second label closure element conditional number, waits to be received second Label closure element conditional number.
Step a20:Judge that whether the second label closure element conditional number is more than 0, be then execution step a21;Otherwise update Second label start element conditional number, return to step a16;
Preferably, updating the second label start element conditional number is the result subtracting 1 by the second label start element conditional number Replace the second original label start element conditional number.
With the data instance in step a19, the second label closure element conditional number is more than 0 for 5, execution step a21.
Step a21:Empty the second label closure element caching, identifying judgement according to the second label closure element condition value is No presence the second label closure element, is then execution step a22;Otherwise entry component identification is updated to entry closure element mark Know, return to step a02;
Also include before this step, host computer judges to whether there is the second label closure element condition value mark in configuration file Know, be then execution step a21;Otherwise report an error, terminate.
In the present embodiment, host computer obtains the second label closure element condition value from configuration file and identifies corresponding value, Using the value getting as the second label closure element condition value, if the second label closure element condition value be more than 0 then it represents that There is the second label closure element, otherwise represent there is not the second label closure element;
VALUE1ENDFLAG0 is designated with the second label closure element condition value, the second label closure element condition value As a example VALUE1ENDFLAG0=2, represent there is the second label closure element, execution step a22;
Step a22:According to second label closure element condition value mark tissue the second label closure element, and it is written into Second label closure element caching, entry component identification is updated to entry closure element mark, return to step a02;
In the present embodiment, according to second label closure element condition value mark tissue the second label closure element specifically, Obtain the second label closure element condition value and identify corresponding second label closure element condition value from configuration file, if the Two label closure element condition values are equal to 1, then host computer is organized the 37th preset value and marked as the first kind second Sign closure element;If the second label closure element condition value is equal to 2, host computer is organized the 38th preset value and is made For the second label closure element;If the second label closure element condition value is equal to 3, host computer organizes the 39th preset value And as the second label closure element;If the second label closure element is equal to 4, host computer organizes the 40th preset value And as the second label closure element;If the second label closure element is equal to other values, report an error, terminate;
Wherein, the 37th preset value be with</ as start element,>As closure element, start element and end are first It is capital V in the middle of element, for example,</V>;38th preset value is</v>;39th preset value be/with>Between have word Symbol data, for example ,/with>Between have space, that is,/>;40th preset value be/with>Between there is no character data, i.e./>;
With the data instance in step a21, the second label closure element condition value VALUE1ENDFLAG0=2, upper unit Knit the 38th preset value and as the second label closure element;
Step a23:Identified according to entry closure element conditional number and obtain entry closure element conditional number, execution step a24;
Also include before this step, host computer judges that whether there is entry closure element conditional number in configuration file identifies, It is then execution step a23;Otherwise report an error, terminate.
In the present embodiment, host computer obtains entry closure element conditional number from configuration file and identifies corresponding value, will obtain The value got, as entry closure element conditional number, is designated MENDFORMFNUM with entry closure element conditional number, and entry is tied As a example Shu Yuansu conditional number MENDFORMFNUM=1.
This step can also be that host computer points out user input entry closure element conditional number, waits entry to be received to terminate Element conditional number.
Step a24:Judge that whether entry closure element conditional number is more than 0, be then execution step a25;Otherwise update second Label closure element conditional number, return to step a20;
Preferably, updating the second label closure element conditional number is the result subtracting 1 by the second label closure element conditional number Replace the second original label closure element conditional number,
With the data instance in step a23, entry closure element conditional number is more than 0 for 1, execution step a25.
Step a25:Empty entry closure element caching, bar is judged whether according to entry closure element condition value mark Mesh closure element, is then execution step a26;Otherwise entry component identification is updated to entry and completes component identification, return to step a02;
Also include before this step, host computer judges that whether there is entry closure element condition value in configuration file identifies, It is then execution step a25;Otherwise report an error, terminate.
In the present embodiment, host computer obtains entry closure element condition value from configuration file and identifies corresponding value, will obtain The value got is as entry closure element condition value, if entry closure element condition value is more than 0, represents that there is entry terminates Element;Otherwise represent there is not entry closure element;
MENDFORMFLAG0, entry closure element condition value are designated with entry closure element condition value As a example MENDFORMFLAG0=2, execution step a26;
Step a26:Tissue entry closure element is identified according to entry closure element condition value, and is written into entry and terminate Element caches, and entry component identification is updated to entry and completes component identification, return to step a02;
In the present embodiment, according to entry closure element condition value identify tissue entry closure element specifically, from configuration literary composition Obtain entry closure element condition value in part and identify corresponding entry closure element condition value, if entry closure element condition value Equal to 1, then host computer organizes the 41st preset value and as entry closure element;If entry closure element condition value Equal to 2, then host computer organizes the 42nd preset value and as entry closure element;If entry closure element condition value Equal to other values, then report an error, terminate.
Wherein, the 41st preset value be with</ as start element,>As closure element, start element and end unit It is lower case m in the middle of element, that is,</m>;42nd preset value is</M>;
With the data instance in step a25, entry closure element condition value MENDFORMFLAG0=2, host computer combined value For the 42nd preset value</M>Entry closure element.
Step a27:Remove entry component identification, update entry closure element conditional number, return to step a24.
Preferably, updating entry closure element conditional number is that the result subtracting 1 by entry closure element conditional number is replaced originally Entry closure element conditional number.
Embodiment 3
The present embodiment is a kind of method automatically generating message, specifically includes,
Step 300:Host computer obtains conditional number, and whether Rule of judgment number is more than pre-conditioned number, is then execution step 301;Otherwise end operation.
Step 301:Host computer opens configuration file, obtains component identification from configuration file;
Step 302:Host computer judges component identification type, if prefix component identification then execution step 303;If Preamble start element mark then execution step 304;If preamble keyword component identification then execution step 305;If sequence Speech closure element mark then execution step 306;If root start element mark then execution step 307;If display starts Component identification then execution step 308;If display closure element mark then execution step 309;If component identification is not show Show start element mark then execution step 310;If component identification is not show that closure element identifies, execution step 311;As Fruit is root knot bundle component identification then execution step 312;If component identification is suffix component identification, execution step 313;If It is that message completes component identification then execution step 314;
Step 303:Host computer judges that whether there is prefix condition value in configuration file identifies, and is then according to prefix condition value Mark obtains prefix condition value from configuration file, organizes prefix information according to prefix condition value and is preserved, by element mark Know and be updated to preamble start element mark, return to step 302;Otherwise report an error, terminate;
Wherein, component identification is initially prefix component identification;
Specifically, when host computer determines and there is prefix condition value mark in configuration file, identified according to prefix condition value Judge whether prefix information, be, tissue prefix information is identified according to prefix condition value and is preserved, by component identification It is updated to preamble start element mark, return to step 302, otherwise component identification is updated to preamble start element mark, returns Step 302;
The method judging whether prefix information is identical with step 105 in embodiment 1, before prefix condition value tissue The method sewing information is identical with step 106 in embodiment 1, repeats no more.
Step 304:Host computer judges to start condition value mark with the presence or absence of preamble in configuration file, is to be opened according to preamble Beginning condition value mark obtains preamble from configuration file and starts condition value, starts condition value tissue preamble head data simultaneously according to preamble Preserved, component identification is updated to preamble keyword component identification, return to step 302;Otherwise report an error, terminate;
Specifically, when host computer determines that there is preamble in configuration file starts condition value mark, bar is started according to preamble Part value mark judges whether preamble head data, is, starts condition value mark tissue preamble head data according to preamble and protects Deposit, component identification is updated to preamble keyword component identification, return to step 302;Otherwise component identification is updated to preamble to close Key Character table identifies, return to step 302;
The method judging whether preamble head data is identical with step 109 in embodiment 1, starts condition value according to preamble The method of mark tissue preamble head data is identical with step 110 in embodiment 1, repeats no more.
Step 305:Host computer judges that whether there is preamble key condition value in configuration file identifies, and is then according to preamble Key condition value mark obtains preamble key condition value from configuration file, organizes preamble according to preamble key condition value Keyword is simultaneously preserved, and component identification is updated to preamble closure element mark, return to step 302;Otherwise report an error, terminate;
Step 306:Host computer judges that whether there is preamble termination condition value in configuration file identifies, and is then to be tied according to preamble Bundle condition value mark obtains preamble termination condition value from configuration file, organizes preamble to terminate data according to preamble termination condition value And preserved, component identification is updated to root start element mark, return to step 302;Otherwise report an error, terminate;
Specifically, when host computer determines and there is preamble termination condition value mark in configuration file, bar is terminated according to preamble Part value mark judges whether that preamble terminates data, is, identifies tissue preamble according to preamble termination condition value and terminates data simultaneously Preserve, component identification is updated to root start element mark, return to step 302;Otherwise component identification is updated to root and starts unit Element mark, return to step 302;
Judge whether preamble terminate data method identical with step 119 in embodiment 1, according to preamble termination condition The method that value mark tissue preamble terminates data is identical with step 120 in embodiment 1, repeats no more.
Step 307:Host computer judges that whether there is root start element condition value in configuration file identifies, and is to be opened according to root Beginning element condition value mark obtains root start element condition value from configuration file, organizes root to open according to root start element condition value Beginning element simultaneously will preserve, and component identification is updated to show start element mark, return to step 302;Otherwise report an error, terminate;
Specifically, when host computer determines and there is root start element condition value mark in configuration file, unit is started according to root Plain condition value mark judges whether root start element, is then to identify tissue root start element according to root start element condition value And preserve, component identification is updated to show start element mark, return to step 302;Otherwise component identification is updated to show Start element identifies, return to step 302;
The method judging whether root start element is identical with step 128 in embodiment 1, according to root start element condition The method of value mark tissue root start element is identical with step 129 in embodiment 1, repeats no more.
Step 308:Host computer judges to whether there is display start element condition value mark in configuration file, is then according to aobvious Show that start element condition value mark obtains display start element condition value from configuration file, according to display start element condition value Tissue display start element, organizes displayed entries data, and will show that start element and displayed entries data preserve, by element mark Know and be updated to show closure element mark, return to step 302;Otherwise report an error, terminate;
In the present embodiment, a message can comprise one or more displayed entries data.Tissue displayed entries data Method detailed in Example 4.
Specifically, when host computer determines and there is display start element condition value mark in configuration file, opened according to display Beginning element condition value mark judges whether to show start element, is then aobvious according to display start element condition value mark tissue Show start element and preserve, component identification is updated to show closure element mark, return to step 302;Otherwise by component identification It is updated to show closure element mark, return to step 302;
Judge whether to show that the method for start element is identical with step 136 in embodiment 1, according to display start element The method of condition value mark tissue display start element is identical with step 137 in embodiment 1, repeats no more.
Step 309:Host computer judges to whether there is display closure element condition value mark in configuration file, is then according to aobvious Show that closure element condition value mark obtains display closure element condition value from configuration file, according to display closure element condition value Tissue display closure element is simultaneously preserved, and component identification is updated to not show that start element identifies, return to step 302;No Then report an error, terminate;
Specifically, when host computer determines and there is display closure element condition value mark in configuration file, according to display knot Shu Yuansu condition value mark judges whether to show closure element, is then aobvious according to display closure element condition value mark tissue Show closure element and preserve, component identification is updated to not show that start element identifies, return to step 302;Otherwise by element mark Know and be updated to not show that start element identifies, return to step 302;
Judge whether to show that the method for closure element is identical with step 141 in embodiment 1, according to display closure element The method of condition value mark tissue display closure element is identical with step 142 in embodiment 1, repeats no more.
Step 310:Host computer judges to whether there is in configuration file and does not show that start element condition value identifies, and is then basis Do not show that start element condition value mark obtains from configuration file and do not show start element condition value, start unit according to not showing Plain condition value tissue does not show start element, tissue not displayed entries data, and will not show start element and non-displayed entries Data preserves, and component identification is updated to not show that closure element identifies, return to step 302;Otherwise report an error, terminate;
In the present embodiment, a message can comprise one or more not displayed entries data, tissue not show bar mesh number According to method with tissue displayed entries data method identical, detailed in Example 4.
Specifically, when host computer determine exist in configuration file do not show start element condition value mark when, according to not showing Show that start element condition value mark judges whether not show start element, be, basis does not show start element condition value mark Know tissue not showing start element and preserve, component identification is updated to not show that closure element identifies, return to step 302;No Then component identification is updated to not show that closure element identifies, return to step 302;
Judge whether that the method not showing start element is identical with step 145 in embodiment 1, start according to not showing Element condition value mark tissue does not show that the method for start element is identical with step 146 in embodiment 1, repeats no more.
Step 311:Host computer judges to whether there is in configuration file and does not show that closure element condition value identifies, and is then basis Do not show that closure element condition value mark obtains from configuration file and do not show closure element condition value, terminate unit according to not showing Plain condition value tissue does not show closure element and is preserved, and component identification is updated to root knot bundle component identification, return to step 302;Otherwise report an error, terminate;
Specifically, when host computer determine exist in configuration file do not show closure element condition value mark when, according to not showing Show that closure element condition value mark judges whether not show closure element, be, basis does not show closure element condition value mark Know tissue not showing closure element and preserve, component identification is updated to not show that closure element identifies, return to step 302;No Then component identification is updated to not show that closure element identifies, return to step 302;
Judge whether that the method not showing closure element is identical with step 150 in embodiment 1, unit is terminated according to display Plain condition value mark tissue does not show that the method for closure element is identical with step 151 in embodiment 1, repeats no more.
Step 312:Host computer judges that whether there is root closure element condition value in configuration file identifies, and is then according to root knot Shu Yuansu condition value mark obtains root closure element condition value from configuration file, organizes root knot according to root closure element condition value Shu Yuansu is simultaneously preserved, and component identification is updated to suffix component identification, return to step 302;Otherwise report an error, terminate;
Specifically, when host computer determines and there is root closure element condition value mark in configuration file, according to root knot Shu Yuan Plain condition value mark judges whether root closure element, is then to identify tissue root closure element according to root closure element condition value And preserve, component identification is updated to suffix component identification, return to step 302;Otherwise component identification is updated to suffix element Mark, return to step 302;
The method judging whether root closure element is identical with step 154 in embodiment 1, according to root closure element condition The method of value mark tissue root closure element is identical with step 155 in embodiment 1, repeats no more.
Step 313:Host computer judges that whether there is suffix condition value in configuration file identifies, and is then according to suffix condition value Mark obtains suffix condition value from configuration file, organizes suffix information according to suffix condition value and is preserved, by element mark Knowledge is updated to message and completes component identification, return to step 302;Otherwise report an error, terminate;
Specifically, when host computer determines and there is suffix condition value mark in configuration file, identified according to suffix condition value Judge whether suffix information, be, tissue suffix information is identified according to suffix condition value and preserves, component identification is updated Complete component identification, return to step 302 for message;Otherwise component identification is updated to message and completes component identification, return to step 302;
The method judging whether suffix information is identical with step 158 in embodiment 1, according to suffix condition value mark group The method knitting suffix information is identical with step 159 in embodiment 1, repeats no more.
Step 314:Remove component identification, obtain prefix information, preamble head data, preamble keyword, preamble terminate data, Root start element, display start element, displayed entries data, display closure element, do not show start element, not show bar mesh number According to, do not show closure element, root closure element, suffix information, and the data getting is write message, remove prefix information, Preamble head data, preamble keyword, preamble terminate data, root start element, display start element, displayed entries data, display Closure element, do not show start element, non-displayed entries data, do not show closure element, root closure element, suffix information, more New Terms number, changes and preserves configuration file, closes described configuration file, return to step 300;
In the present embodiment, change and preserve the method for configuration file specifically,
Prefix condition value in more new configuration file and/or preamble start condition value and/or preamble key condition value and/ Or preamble termination condition value and/or root start element condition value and/or display start element condition value and/or display closure element Condition value and/or do not show start element condition value and/or do not show closure element condition value and/or root closure element condition value And/or suffix condition value.
Wherein, the prefix condition value more in new configuration file, specifically, host computer identifies from configuration according to prefix condition value Obtain prefix condition value in file, update prefix condition value, and as the prefix condition value after updating in configuration file;
Preamble in more new configuration file starts condition value, specifically, host computer according to preamble start condition value mark from Obtain preamble in configuration file and start condition value, update preamble and start condition value, and as updating in configuration file after Preamble starts condition value;
Preamble key condition value in more new configuration file, specifically, host computer is according to preamble key condition value mark Know and obtain preamble key condition value from configuration file, update preamble key condition value, and as in configuration file Preamble key condition value after renewal;
Preamble termination condition value in more new configuration file, specifically, host computer according to preamble termination condition value identify from In configuration file obtain preamble termination condition value, update preamble termination condition value, and as in configuration file update after Preamble termination condition value.
Root start element condition value in more new configuration file, specifically, host computer is according to root start element condition value mark Know and obtain root start element condition value from configuration file, more new root start element condition value, and as in configuration file Root start element condition value after renewal;
Display start element condition value in more new configuration file, specifically, host computer is according to display start element condition Value mark obtains display start element condition value from configuration file, updates display start element condition value, and as joining Put the display start element condition value after updating in file;
Display closure element condition value in more new configuration file, specifically, host computer is according to display closure element condition Value mark obtains display closure element condition value from configuration file, updates display closure element condition value, and as joining Put the display closure element condition value after updating in file;
Start element condition value is not shown, specifically, host computer is not according to showing start element in more new configuration file Condition value mark obtains from configuration file and does not show start element condition value, updates and does not show start element condition value, and will Its as in configuration file update after do not show start element condition value;
Closure element condition value is not shown, specifically, host computer is not according to showing closure element in more new configuration file Condition value mark obtains from configuration file and does not show closure element condition value, updates and does not show closure element condition value, and will Its as in configuration file update after do not show closure element condition value;
Root closure element condition value in more new configuration file, specifically, host computer is according to root closure element condition value mark Know and obtain root closure element condition value from configuration file, update root closure element condition value, and as in configuration file Root closure element condition value after renewal.
Suffix condition value in more new configuration file, specifically, host computer identifies from configuration file according to suffix condition value Middle acquisition suffix condition value, updates suffix condition value, and as the suffix condition value after updating in configuration file.
Embodiment 4
One or more displayed entries data can be comprised in one message, two or more not displayed entries can be comprised Data, the method for tissue displayed entries data is identical with the method organizing not displayed entries data, and the present embodiment is a kind of automatic The method of tissue displayed entries data, including,
Step 401:Host computer obtains entry component identification from configuration file;
Step 402:Judge entry component identification type, if entry start element mark then execution step 403;If It is the first label start element mark then execution step 404;If the first label closure element mark then execution step 405; If the second label start element mark then execution step 406;If the second label closure element mark then execution step 407;If entry closure element mark then execution step 408;If entry completes component identification then execution step 409;
Step 403:Host computer judges that whether there is entry start element condition value in configuration file identifies, and is then according to bar Mesh start element condition value mark obtains entry start element condition value, according to entry start element condition value from configuration file Tissue entry start element, and entry start element is preserved, entry component identification is updated to the first label start element mark Know, return to step 402;Otherwise report an error, terminate;
Step 404:Host computer judges to whether there is the first label start element condition value mark in configuration file, is then root Obtain the first label start element condition value according to the first label start element condition value mark from configuration file, according to the first mark Sign start element condition value and organize the first label start element and the first text data, and by the first label start element and first Text data preserves, and entry component identification is updated to the first label closure element mark, return to step 402;Otherwise report an error, knot Bundle;
Step 405:Host computer judges to whether there is the first label closure element condition value mark in configuration file, is then root Obtain the first label closure element condition value according to the first label closure element condition value mark from configuration file, according to the first mark Sign closure element condition value and organize the first label closure element, and preserved, entry component identification is updated to the second label Start element identifies, return to step 402;Otherwise report an error, terminate;
Step 406:Host computer judges to whether there is the second label start element condition value mark in configuration file, is then root Obtain the second label start element condition value according to the second label start element condition value mark from configuration file, according to the second mark Sign start element condition value and organize the second label start element and the second text data, and by the second label start element and second Text data preserves, and entry component identification is updated to the second label closure element mark, return to step 402;Otherwise report an error, knot Bundle;
Step 407:Host computer judges to whether there is the second label closure element condition value mark in configuration file, is then root Obtain the second label closure element condition value according to the second label closure element condition value mark from configuration file, according to the second mark Sign closure element condition value to organize the second label closure element and preserved, entry component identification is updated to entry and completes unit Element mark, return to step 402;Otherwise report an error, terminate;
Step 408:Host computer judges that whether there is entry closure element condition value in configuration file identifies, and is then according to bar Mesh closure element condition value mark obtains entry closure element condition value, according to entry closure element condition value from configuration file Tissue entry closure element, and preserved, entry component identification is updated to entry and completes component identification, return to step 402; Otherwise report an error, terminate;
Step 409:Remove entry component identification, obtain entry start element, the first label start element, the first label knot Shu Yuansu, the second label start element, the second label closure element, entry closure element, using the data getting as entry Data, remove entry start element, the first label start element, the first label closure element, the second label start element, second Label closure element, entry closure element, terminate.
It should be noted that in embodiment of the present invention, also including after reporting an error, emptying all cachings, removing entry unit Element mark, above-mentioned embodiment equally can reach the purpose of the present invention.
The above, the only specific embodiment of the present invention, but protection scope of the present invention is not limited thereto, and any Those familiar with the art the invention discloses technical scope in, change or replacement can be readily occurred in, all should contain Cover within protection scope of the present invention.Therefore, protection scope of the present invention should described be defined by scope of the claims.

Claims (6)

1. a kind of method automatically generating message it is characterised in that include,
Step S01:Host computer opens configuration file, obtains component identification from described configuration file;
Step S02:Described host computer judges described component identification type, if root start element mark then execution step S03; If display start element mark then execution step S04;If display closure element mark then execution step S05;If It is root knot bundle component identification then execution step S06;If message completes component identification then execution step S07;
Step S03:Described host computer judges that whether there is root start element condition value in described configuration file identifies, and is then basis Described start element condition value mark obtains root start element condition value from described configuration file, starts unit according to described Plain condition value tissue root start element simultaneously preserves, and described component identification is updated to show start element mark, return to step S02;Otherwise report an error, terminate;
Step S04:Described host computer judges to whether there is display start element condition value mark in described configuration file, is then root Obtain display start element condition value according to described display start element condition value mark from described configuration file, according to described aobvious Show start element condition value tissue display start element, organize displayed entries data, and by described display start element and described Displayed entries data preserves, and described component identification is updated to show closure element mark, return to step S02;Otherwise report an error, knot Bundle;
Step S05:Described host computer judges to whether there is display closure element condition value mark in described configuration file, is then root Obtain display closure element condition value according to described display closure element condition value mark from described configuration file, according to described aobvious Show closure element condition value tissue display closure element and preserved, described component identification is updated to root closure element mark Know, return to step S02;Otherwise report an error, terminate;
Step S06:Described host computer judges that whether there is root closure element condition value in described configuration file identifies, and is then basis Described closure element condition value mark obtains root closure element condition value, according to described root knot Shu Yuan from described configuration file Plain condition value tissue root closure element is simultaneously preserved, and described component identification is updated to message and completes component identification, return step Rapid S02;Otherwise report an error, terminate;
Step S07:Described host computer removes described component identification, according to described start element, described display start element, institute State displayed entries data, described display closure element, described root knot bundle Element generation message, remove described start element, institute State display start element, described displayed entries data, described display closure element, described closure element;
Step S08:Terminate.
2. the method for claim 1 it is characterised in that described component identification also include not showing start element mark, Do not show that closure element identifies;
Accordingly, in described step S02, described host computer judges described component identification type, also includes, if described element mark Knowledge be described do not show start element identify, then execution step V1;If described component identification is described not show closure element Mark, then execution step V2;
Step V1:Described host computer judges with the presence or absence of not showing start element condition value mark in described configuration file, is then Do not show that start element condition value mark obtains from described configuration file and do not show start element condition value according to described, according to Described do not show start element condition value tissue do not show start element and non-displayed entries data, and by described do not show start Element and described not displayed entries data preserve, and described component identification are updated to not show that closure element identifies, return to step S02;Otherwise report an error, terminate;
Step V2:Described host computer judges with the presence or absence of not showing closure element condition value mark in described configuration file, is then Do not show that closure element condition value mark obtains from described configuration file and do not show closure element condition value according to described, according to Described do not show closure element condition value tissue do not show closure element and preserved, described component identification is updated to root knot Bundle component identification, return to step S02;Otherwise report an error, terminate;
In described step S07 generate message element also include, described do not show start element, described not displayed entries data, Described do not show closure element;The element removed also includes, and described does not show start element, described not displayed entries data, institute State and do not show closure element.
3. the method for claim 1 is it is characterised in that also include before described step S01:
Step S01-1:Described host computer obtains conditional number, judges whether described conditional number is more than pre-conditioned number, is to execute Step S01;Otherwise end operation;
Also include before described step S08, update described conditional number, change and preserve described configuration file, join described in closing Put file, return to step S01-1.
4. method as claimed in claim 3 is it is characterised in that described change and preserve described configuration file, specifically,
Described host computer updates described start element condition value and/or described display start element bar in described configuration file Part value and/or described display closure element condition value and/or described closure element condition value;
Described host computer updates described start element condition value in described configuration file, specifically, described host computer according to Described start element condition value mark obtains root start element condition value from described configuration file, updates described and starts unit Plain condition value, and as the root start element condition value after updating in described configuration file;
Described host computer updates the described display start element condition value in described configuration file, specifically, described host computer root Obtain display start element condition value according to described display start element condition value mark from described configuration file, update described aobvious Show start element condition value, and as the display start element condition value after updating in described configuration file;
Described host computer updates the described display closure element condition value in described configuration file, specifically, described host computer root Obtain display closure element condition value according to described display closure element condition value mark from described configuration file, update described aobvious Show closure element condition value, and as the display closure element condition value after updating in described configuration file;
Described host computer updates described closure element condition value in described configuration file, specifically, described host computer according to Described closure element condition value mark obtains root closure element condition value from described configuration file, updates described root knot Shu Yuan Plain condition value, and as the root closure element condition value after updating in described configuration file.
5. the method for claim 1 it is characterised in that described tissue displayed entries data specifically,
Step M1:Described host computer obtains entry component identification from described configuration file;
Step M2:Judge described entry component identification type, if entry start element mark then execution step M3;If First label start element mark then execution step M4;If the first label closure element mark then execution step M5;If It is the second label start element mark then execution step M6;If the second label closure element mark then execution step M7;As Fruit is entry closure element mark then execution step M8;If entry completes component identification then execution step M9;
Step M3:Described host computer judges that whether there is entry start element condition value in described configuration file identifies, and is then root Obtain entry start element condition value according to described entry start element condition value mark from described configuration file, according to described bar Mesh start element condition value organizes entry start element, and described entry start element is preserved, by described entry component identification It is updated to the first label start element mark, return to step M2;Otherwise report an error, terminate;
Step M4:Described host computer judges to whether there is the first label start element condition value mark in described configuration file, is Then the first label start element condition is obtained from described configuration file according to described first label start element condition value mark Value, organizes the first label start element and the first text data according to described first label start element condition value, and will be described First label start element and described first text data preserve, and described entry component identification is updated to the first label and terminates unit Element mark, return to step M2;Otherwise report an error, terminate;
Step M5:Described host computer judges to whether there is the first label closure element condition value mark in described configuration file, is Then the first label closure element condition is obtained from described configuration file according to described first label closure element condition value mark Value, organizes the first label closure element according to described first label closure element condition value, and is preserved, by described entry unit Element mark is updated to the second label start element mark, return to step M2;Otherwise report an error, terminate;
Step M6:Described host computer judges to whether there is the second label start element condition value mark in described configuration file, is Then the second label start element condition is obtained from described configuration file according to described second label start element condition value mark Value, organizes the second label start element and the second text data according to described second label start element condition value, and will be described Second label start element and described second text data preserve, and described entry component identification is updated to the second label and terminates unit Element mark, return to step M2;Otherwise report an error, terminate;
Step M7:Described host computer judges to whether there is the second label closure element condition value mark in described configuration file, is Then the second label closure element condition is obtained from described configuration file according to described second label closure element condition value mark Value, organizes the second label closure element and is preserved according to described second label closure element condition value, by described entry unit Element mark is updated to entry and completes component identification, return to step M2;Otherwise report an error, terminate;
Step M8:Described host computer judges that whether there is entry closure element condition value in described configuration file identifies, and is then root Obtain entry closure element condition value according to described entry closure element condition value mark from described configuration file, according to described bar Mesh closure element condition value organizes entry closure element, and is preserved, and described entry component identification is updated to entry and completes Component identification, return to step M2;Otherwise report an error, terminate;
Step M9:Remove described entry component identification, obtain described entry start element, described first label start element, institute State the first label closure element, described second label start element, described second label closure element, described entry terminate unit Element, using the data getting as entry data, removes described entry start element, described first label start element, described First label closure element, described second label start element, described second label closure element, described entry closure element, Terminate.
6. the method for claim 1 it is characterised in that described component identification also includes prefix component identification, open by preamble Beginning component identification, preamble keyword component identification, preamble closure element mark, suffix component identification;
Accordingly, in described step S02, described host computer judges described component identification type, also includes, if prefix element Mark then execution step K1;If preamble start element mark then execution step K2;If preamble keyword component identification Then execution step K3;If preamble closure element mark then execution step K4;If described component identification is suffix element mark Know then execution step K5;
Step K1:Described host computer judges that whether there is prefix condition value in described configuration file identifies, and is then according to before described Sew condition value mark and obtain prefix condition value from described configuration file, prefix information is organized according to described prefix condition value and incites somebody to action It preserves, and described component identification is updated to preamble start element mark, return to step S02;Otherwise report an error, terminate;Described unit Element mark is initially prefix component identification;
Step K2:Described host computer judges to start condition value mark with the presence or absence of preamble in described configuration file, is then according to institute State preamble start condition value mark from described configuration file obtain preamble start condition value, condition value is started according to described preamble Tissue preamble head data is simultaneously preserved, and described component identification is updated to preamble keyword component identification, return to step S02; Otherwise report an error, terminate;
Step K3:Described host computer judges that whether there is preamble key condition value in described configuration file identifies, and is then basis Described preamble key condition value mark obtains described preamble key condition value, according to described preamble from described configuration file Key condition value tissue preamble keyword is simultaneously preserved, and described component identification is updated to preamble closure element mark, returns Return step S02;Otherwise report an error, terminate;
Step K4:Described host computer judges that whether there is preamble termination condition value in described configuration file identifies, and is then according to institute State preamble termination condition value mark and obtain preamble termination condition value from described configuration file, according to described preamble termination condition value Tissue preamble terminates data and is preserved, and described component identification is updated to root start element mark, return to step S02;No Then report an error, terminate;
Step K5:Described host computer judges that whether there is suffix condition value in described configuration file identifies, and is then according to after described Sew condition value mark and obtain suffix condition value from described configuration file, suffix information is organized according to described suffix condition value and incites somebody to action It preserves, and described component identification is updated to message and completes component identification, return to step S02;Otherwise report an error, terminate;
The element generating message in described step S07 also includes, and described prefix information, described preamble head data, described preamble close Key word, described preamble terminate data, suffix information;Remove element also include, described prefix information, described preamble head data, Described preamble keyword, described preamble terminate data, described suffix information.
CN201310752730.2A 2013-12-31 2013-12-31 Automatic message generating method Expired - Fee Related CN103873459B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310752730.2A CN103873459B (en) 2013-12-31 2013-12-31 Automatic message generating method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310752730.2A CN103873459B (en) 2013-12-31 2013-12-31 Automatic message generating method

Publications (2)

Publication Number Publication Date
CN103873459A CN103873459A (en) 2014-06-18
CN103873459B true CN103873459B (en) 2017-02-15

Family

ID=50911586

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310752730.2A Expired - Fee Related CN103873459B (en) 2013-12-31 2013-12-31 Automatic message generating method

Country Status (1)

Country Link
CN (1) CN103873459B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5884248A (en) * 1996-04-10 1999-03-16 Casio Computer Co., Ltd. Build message communication system utilizing data tables containing message defining data and corresponding codes
CN102611531A (en) * 2012-03-12 2012-07-25 成都龙冠科技实业有限公司 One-way data transmission method

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5884248A (en) * 1996-04-10 1999-03-16 Casio Computer Co., Ltd. Build message communication system utilizing data tables containing message defining data and corresponding codes
CN102611531A (en) * 2012-03-12 2012-07-25 成都龙冠科技实业有限公司 One-way data transmission method

Also Published As

Publication number Publication date
CN103873459A (en) 2014-06-18

Similar Documents

Publication Publication Date Title
CN104252452B (en) The method and device of data management
CN104899016B (en) Allocating stack Relation acquisition method and device
KR101394874B1 (en) Device and method implementing for particular function based on writing
CN110515896B (en) Model resource management method, model file manufacturing method, device and system
CN110515951A (en) A kind of BOM standardized method, system and electronic equipment and storage medium
CN106610774A (en) Webpage table editing method and device
CN109298882A (en) Management method, computer readable storage medium and the terminal device of interface
CN107608951A (en) Report form generation method and system
CN103761095B (en) Method for generating universal upgrade file head data information
CN101727270A (en) Method for constructing soft keyboard, device for inputting character information and method thereof
CN110147431A (en) Key word matching method, device, computer equipment and storage medium
CN103873459B (en) Automatic message generating method
CN109359176A (en) Data extraction method, device, computer equipment and storage medium
CN112416934A (en) hive table incremental data synchronization method and device, computer equipment and storage medium
CN101996161B (en) A kind of old version data processing method of electronic document and device
CN112130733A (en) Thumbnail-based document display method and equipment
CN113127776A (en) Breadcrumb path generation method and device and terminal equipment
US11941032B2 (en) Key name generation method and apparatus and non-transitory computer-readable storage medium
CN103841253A (en) Method and terminal for adding contact persons
CN100407204C (en) Method for labeling computer resource and system therefor
CN106201442B (en) The execution method and device of application program
CN103914481B (en) Date storage method and device
CN113608903A (en) Fault management method based on XML language
CN105045728A (en) Local cache method
KR101396090B1 (en) Apparatus and method for conversion of xml letters, and system for processing of xml letters with the same

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20170215