CN102567482A - Extensive makeup language (XML) analytic method and XML analytic device facing to customers - Google Patents

Extensive makeup language (XML) analytic method and XML analytic device facing to customers Download PDF

Info

Publication number
CN102567482A
CN102567482A CN2011104287149A CN201110428714A CN102567482A CN 102567482 A CN102567482 A CN 102567482A CN 2011104287149 A CN2011104287149 A CN 2011104287149A CN 201110428714 A CN201110428714 A CN 201110428714A CN 102567482 A CN102567482 A CN 102567482A
Authority
CN
China
Prior art keywords
control
xml
xml file
merging
controls
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.)
Granted
Application number
CN2011104287149A
Other languages
Chinese (zh)
Other versions
CN102567482B (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.)
Neusoft Corp
Original Assignee
Neusoft Corp
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 Neusoft Corp filed Critical Neusoft Corp
Priority to CN201110428714.9A priority Critical patent/CN102567482B/en
Publication of CN102567482A publication Critical patent/CN102567482A/en
Application granted granted Critical
Publication of CN102567482B publication Critical patent/CN102567482B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention provides an extensive makeup language (XML) analytic method facing to customers, which includes: searching and determining all java script (JS) controls needing to be processed, and sequentially processing the JS controls and outputting processing results. The JS controls comprise 'source' controls, 'conversion' controls, 'combination' controls, 'integration' controls, 'filter' controls and 'release' controls. By using the XML analytic method and the XML analytic device facing to customers, a user can analyze and process XML files according to requirements of the user fast and conveniently without knowing well analytic tool bags of the XML files.

Description

Customer-oriented XML analytic method and device
Technical field
The present invention relates to the Computer Applied Technology field, more particularly, relate to a kind of customer-oriented XML analytic method and device.
Background technology
XML is as a kind of language of in Any Application, reading and writing data of simply being easy to, and the independence of its platform, language, system makes it be widely used in the Web transmission.
The analysis mode of XML in different language all is the same, and the grammer of only realizing is different.Now, according to user's demand the kit of a lot of parsings and processing XML file has appearred also, such as based on the parsing SAX of flow of event with based on the parsing DOM of XML document tree construction.But the user also has some limitation when utilizing these XML kits:
At first, if the logic of to be resolved and processing XML file is very complicated, need very big size of code accomplish required processing requirements, the user need be familiar with the analytical tool bag of XML file, could accomplish parsing;
In addition, when needs are handled a plurality of XML files, carry out processing one by one, can increase user's workload, reduce user's user satisfaction the XML file.
Summary of the invention
In view of the above problems, the purpose of this invention is to provide a kind of customer-oriented XML analytic method and device.
According to an aspect of the present invention, a kind of customer-oriented XML analytic method is provided, has comprised:
All the JS controls that need handle are confirmed in search;
Handle said JS control successively;
The output result; Wherein,
Said JS control comprises: " source " control, " conversion " control, " combination " control, " merging " control, " filtration " control and " issue " control;
Said " source " control is used to specify the source that will be used to start the XML file processing;
Said " conversion " control is used for reconstruct XML file;
Said " combination " control is used for the clauses and subclauses of a plurality of XML files are collected single new XML file;
Said " merging " control is used for connecting the entry contents from two XML files according to condition;
Said " filtration " control is used for from the extraction of XML file or gets rid of the particular items that meets specified condition;
Said " issue " control is used for to have the specific XML form output data of specific format head.
According to a further aspect in the invention, a kind of customer-oriented XML resolver is provided, has comprised:
Pending control is confirmed the unit, is used to search for definite all the JS controls that need handle;
The control processing unit is used for handling successively said JS control;
Output unit is used to export result; Wherein,
Said control processing unit comprises:
" source " control subelement is used to specify the source that will be used to start the XML file processing;
" conversion " control subelement is used for reconstruct XML file;
" combination " control subelement is used for the clauses and subclauses of a plurality of XML files are collected single new XML file;
" merging " control subelement is used for connecting the entry contents from two XML files according to condition;
" filtration " control subelement is used for extracting or getting rid of the particular items that meets specified condition from the XML file; And
" issue " control subelement is used for to have the specific XML form output data of specific format head.
Utilize above-mentionedly according to customer-oriented XML analytic method of the present invention and device, the user need not to be familiar with the analytical tool bag of various XML files, also can be quickly and easily according to oneself requirement parsing and processing XML file.In addition, if original data source changes, the user also need not manual handle XML file once more, and is as long as the same process of analysis of functions of use just can be accomplished the parsing of XML file automatically, convenient and swift.
In order to realize above-mentioned and relevant purpose, one or more aspects of the present invention comprise the characteristic that the back will specify and in claim, particularly point out.Following explanation and accompanying drawing have specified some illustrative aspects of the present invention.Yet, the indication of these aspects only be some modes that can use in the variety of way of principle of the present invention.In addition, the present invention is intended to comprise all these aspects and their equivalent.
Description of drawings
Through with reference to below in conjunction with the explanation of accompanying drawing and the content of claims, and along with to more complete understanding of the present invention, other purpose of the present invention and result will understand more and reach easy to understand.In the accompanying drawings:
Fig. 1 is the process flow diagram according to customer-oriented XML analytic method of the present invention;
Fig. 2 is calling basically in proper order and regular synoptic diagram according to the control of the embodiment of the invention;
Fig. 3 carries out the treatment scheme synoptic diagram according to " merging " control of the embodiment of the invention;
Fig. 4 carries out the treatment scheme synoptic diagram according to " filtration " control of the embodiment of the invention;
Fig. 5 is the block diagram according to customer-oriented XML resolver of the present invention.
Identical label is indicated similar or corresponding feature or function in institute's drawings attached.
Embodiment
Below will combine accompanying drawing that specific embodiment of the present invention is described in detail.
For the parsing that overcomes existing XML file and the limitation of handling implement bag; The present invention proposes customer-oriented analytic method; In client, JS (Java script) control of user through pulling edited existing one or more XML file according to the requirement of oneself.Through this JS control, the user can obtain the result in the XML file any processor process at any time, also can change the rule of parsing and processing XML file at any time.
Fig. 1 shows the process flow diagram according to customer-oriented XML analytic method of the present invention.
When the user need carry out dissection process to an XML file; Only need use the predefined JS control that pulls just can be in client according to this XML file of requirement editor of oneself, the JS control background application XML handling implement bag (like the DOM kit) to database in pending XML file carry out corresponding dissection process.
As shown in Figure 1, bring in from the client and to see, at first to from database, search for to confirm all the JS controls (step S110) that need handle; Handle the above-mentioned determined JS control of need handling then successively, up to all the JS controls that need handle dispose (step S120); Export result at last, the XML file (step S130) of promptly resolving.
The JS control that can pull comprises source, conversion, combination, merging, filtration, issue, and calling basically of these controls is as shown in Figure 2 with rule in proper order.
Wherein, " source " control is used to specify the source that will be used to start the XML file processing.Data can be used a plurality of " source " control; " source " control is that each XML dissection process process begins the control handled at first; Carry out XML when resolving at utilization DOM4J kit, the user pulls " source " control, the performed operation in backstage be exactly according to database in the path of XML file storage; Read the XML file, so that other control is handled.
" combination " control is used to two or more " source " made up, and the clauses and subclauses that are about in a plurality of XML files are collected single new XML file.When combination, the clauses and subclauses in each XML file all will be added to new XML file as a complete set, can a plurality of operational controls be inserted into " combination " control running program.For example: first feed comprises the record of personnel's essential information of three classmates; Second feed comprises personnel's essential information record of two teachers; File after the combination will comprise five records, and each bar record will comprise all personnel's essential informations from first feed or second feed." combination " operational controls needs two inputs at least, and the combination of the data of a plurality of files can use kit (like DOM4J or other XML file parsing tool bags) to realize.
" conversion " control is used to the specified XML file of reconstruct " source " control.The user can create new element, remove existing certain element through " conversion " control.In the process of reconstruct; The user only needs need to confirm the object of reconstruct; " conversion " control will be read the result as the previous control processing XML file of reconstruct object on the backstage; As the source file that " conversion " control is handled, use XML file parsing tool bag (like DOM4J or other XML file parsing tool bags) then, according to the processing rule processing XML file in the database.
For example; Writing down personnel's essential information in the source file, comprising information such as height, body weight, nationality, nationality, hobby, the user needs " height " situation of statistician now; Out of Memory is unwanted, obtains clauses and subclauses through the conversion control and only has personnel's " height " information.
" merging " control is used to connect the entry contents from two XML files according to condition.For example, if first feed comprises address information, second feed comprises Weather information, can merge clauses and subclauses according to postcode so, and the clauses and subclauses after the merging are with having address information and Weather information simultaneously.
After the merging condition of user's input was stored in the database, " merging " control was carried out treatment scheme as shown in Figure 3:
S310: in database, obtain first, second XML file data source to be combined.Can utilize two XML file data sources that the DOM4J software package reads needs merging; In this control treatment scheme of the present invention, this reading of XML file data source to be combined also is appreciated that to reading the merging control result of two control processing XML before;
S320: the merging condition of search " merging " control in database;
S330: appear at the element in the merging condition in more above-mentioned one by one first XML file data source and second XML file data source;
S340: judge whether above-mentioned element satisfies the merging condition; If satisfy condition, using the comparison condition evaluation such as the value of obtaining from two transmission of data sources is true, then gets into step S350, otherwise (is false such as the comparison condition evaluation) gets into step S360;
S350: the given clauses and subclauses in the given clauses and subclauses in first XML file data source and second the XML file data source are merged into clauses and subclauses, add output listing;
S360: judge more whether finish,, then get into step S370, otherwise return step S330 if finish;
S370: output amalgamation result.
" filtration " control is used to from the XML file, extract or get rid of the particular items that meets specified condition, and its idiographic flow is as shown in Figure 4:
S410: obtain the XML file data source that to filter.Equally, can utilize the XML file data source that the DOM4J software package reads needs filtration, in this control treatment scheme of the present invention, this reading of XML file data source to be filtered also is appreciated that to reading the result of previous control processing XML;
S420: the filtercondition of " filtration " control is somebody's turn to do in search from database;
S430: utilize the XQuery technology to filter XML file data source according to above-mentioned filtercondition;
S440: output filtering result.
" issue " control be used to have the specific format head (<result></result>) specific XML form output data.
Can find out that through the foregoing description use this method analyzing XML file, the user need not to be familiar with the analytical tool bag of various XML files, also can be quickly and easily according to oneself requirement parsing and processing XML file.If original data source changes, the user need not manual handle XML file once more.
Corresponding with above-mentioned customer-oriented XML analytic method, the present invention also provides a kind of customer-oriented XML resolver.
Fig. 5 shows the block diagram according to customer-oriented XML resolver 500 of the present invention.As shown in Figure 5, customer-oriented XML resolver 500 comprises pending control determination module 510, control processing module 520 and output module 530.
Wherein, pending control determination module 510 is used to search for definite all the JS controls that need handle; Control processing module 520 is used for handling successively the JS control that above-mentioned pending control determination module 510 determined needs are handled; Output module 530 is used to export result.
And control processing module 520 further comprises:
" source " control element 521 is used to specify the source that will be used to start the XML file processing;
" conversion " control element 522 is used for reconstruct XML file;
" combination " control element 523 is used for the clauses and subclauses of a plurality of XML files are collected single new XML file;
" merging " control element 524 is used for connecting the entry contents from two XML files according to condition;
" filtration " control element 525 is used for extracting or getting rid of the particular items that meets specified condition from the XML file; And
" issue " control element 526 is used for to have the specific XML form output data of specific format head.
As above describe according to customer-oriented XML analytic method of the present invention and device with the mode of example with reference to accompanying drawing.But, it will be appreciated by those skilled in the art that the customer-oriented XML analytic method and the device that propose for the invention described above, can also on the basis that does not break away from content of the present invention, make various improvement.Therefore, protection scope of the present invention should be confirmed by the content of appending claims.

Claims (6)

1. customer-oriented XML analytic method comprises:
All the JS controls that need handle are confirmed in search;
Handle said JS control successively;
The output result; Wherein,
Said JS control comprises: " source " control, " conversion " control, " combination " control, " merging " control, " filtration " control and " issue " control;
Said " source " control is used to specify the source that will be used to start the XML file processing;
Said " conversion " control is used for reconstruct XML file;
Said " combination " control is used for the clauses and subclauses of a plurality of XML files are collected single new XML file;
Said " merging " control is used for connecting the entry contents from two XML files according to condition;
Said " filtration " control is used for from the extraction of XML file or gets rid of the particular items that meets specified condition;
Said " issue " control is used for to have the specific XML form output data of specific format head.
2. customer-oriented XML analytic method as claimed in claim 1 wherein, is confirmed in the process of all the JS controls that need handle in search, searches for definite rule as follows:
The father node ID of each control is stored in the database, and said father node is the control that back needs of said control are handled; And,
The issue control does not have father node.
3. customer-oriented XML analytic method as claimed in claim 2, wherein, said " merging " control comprises according to the process of condition connection from the entry contents of two XML files:
S310: obtain first, second XML file data source to be combined;
S320: the merging condition of search " merging " control;
S330: appear at the element in the merging condition in more said one by one first XML file data source and second XML file data source;
S340: judge whether said element satisfies the merging condition; If satisfy condition, then get into step S350, otherwise get into step S360;
S350: the given clauses and subclauses in the given clauses and subclauses in first XML file data source and second the XML file data source are merged into clauses and subclauses, add output listing;
S360: judge more whether finish,, then get into step S370, otherwise return step S330 if finish;
S370: output amalgamation result.
4. customer-oriented XML analytic method as claimed in claim 2, wherein, said " filtration " control extracts from the XML file or the process of getting rid of the particular items that meets specified condition comprises:
S410: obtain the XML file data source that to filter;
S420: the filtercondition of " filtration " control is somebody's turn to do in search from database;
S430: utilize the XQuery technology to filter XML file data source according to said filtercondition;
S440: output filtering result.
5. customer-oriented XML resolver comprises:
Pending control is confirmed the unit, is used to search for definite all the JS controls that need handle;
The control processing unit is used for handling successively said JS control;
Output unit is used to export result; Wherein,
Said control processing unit comprises:
" source " control subelement is used to specify the source that will be used to start the XML file processing;
" conversion " control subelement is used for reconstruct XML file;
" combination " control subelement is used for the clauses and subclauses of a plurality of XML files are collected single new XML file;
" merging " control subelement is used for connecting the entry contents from two XML files according to condition;
" filtration " control subelement is used for extracting or getting rid of the particular items that meets specified condition from the XML file; And
" issue " control subelement is used for to have the specific XML form output data of specific format head.
6. customer-oriented XML resolver as claimed in claim 5, wherein, said pending control is confirmed the definite rule of the search of unit as follows:
The father node ID of each control is stored in the database, and said father node is the control that back needs of said control are handled; And,
The issue control does not have father node.
CN201110428714.9A 2011-12-20 2011-12-20 Extensive makeup language (XML) analytic method and XML analytic device facing to customers Expired - Fee Related CN102567482B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201110428714.9A CN102567482B (en) 2011-12-20 2011-12-20 Extensive makeup language (XML) analytic method and XML analytic device facing to customers

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201110428714.9A CN102567482B (en) 2011-12-20 2011-12-20 Extensive makeup language (XML) analytic method and XML analytic device facing to customers

Publications (2)

Publication Number Publication Date
CN102567482A true CN102567482A (en) 2012-07-11
CN102567482B CN102567482B (en) 2014-05-21

Family

ID=46412888

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201110428714.9A Expired - Fee Related CN102567482B (en) 2011-12-20 2011-12-20 Extensive makeup language (XML) analytic method and XML analytic device facing to customers

Country Status (1)

Country Link
CN (1) CN102567482B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104778226A (en) * 2015-03-26 2015-07-15 小米科技有限责任公司 Webpage content item shielding method and webpage content item shielding device

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101355774A (en) * 2008-09-12 2009-01-28 河北全通通信有限公司 Method for customizing script automatization using configuration file
CN102033954A (en) * 2010-12-24 2011-04-27 东北大学 Full text retrieval inquiry index method for extensible markup language document in relational database
US8046737B2 (en) * 2005-04-29 2011-10-25 Microsoft Corporation XML application framework

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8046737B2 (en) * 2005-04-29 2011-10-25 Microsoft Corporation XML application framework
CN101355774A (en) * 2008-09-12 2009-01-28 河北全通通信有限公司 Method for customizing script automatization using configuration file
CN102033954A (en) * 2010-12-24 2011-04-27 东北大学 Full text retrieval inquiry index method for extensible markup language document in relational database

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104778226A (en) * 2015-03-26 2015-07-15 小米科技有限责任公司 Webpage content item shielding method and webpage content item shielding device

Also Published As

Publication number Publication date
CN102567482B (en) 2014-05-21

Similar Documents

Publication Publication Date Title
US8055661B2 (en) Device and method for automatically generating ontology instance
CN100461173C (en) Electronic filing system and electronic filing method
US20120303645A1 (en) System and method for extraction of structured data from arbitrarily structured composite data
RU2007138848A (en) DETERMINING FIELDS FOR SUBMITTED FILES AND EXTENDABLE LANGUAGE SCHEMES FOR BIBLIOGRAPHIES AND QUOTATION
CN105701091B (en) A kind of processing method and processing unit of semantic-based PDF document
CN102566945B (en) Method and system for realizing automatic acquisition and on-demand printing of book
JP2006127518A5 (en)
CN107291949B (en) Information searching method and device
CN104598462B (en) Extract the method and device of structural data
CN101770470A (en) File type identifying and analyzing method and system
JP2010530580A5 (en)
CN106547749B (en) Webpage data acquisition method and device
US20020049686A1 (en) System, method and article of manufacuture for personal catalog and knowledge management
CN105786788A (en) Method and device for generating forms by using WORD program
CN110347982A (en) Tableau format extracting method based on domain knowledge template
CN109325217B (en) File conversion method, system, device and computer readable storage medium
CN102567482B (en) Extensive makeup language (XML) analytic method and XML analytic device facing to customers
US20110270862A1 (en) Information processing apparatus and information processing method
CN107643968A (en) Crash log processing method and processing device
CN106649219B (en) A kind of telecommunication satellite design document automatic generation method
CN107193788A (en) Construction industry engineering project Excel file data format storage method and system
JP2011053881A (en) Document management system
JP2002169836A (en) Support system for integration and rearrangement of information
KR102072236B1 (en) Apparatus and method for processing structured stream data
Su et al. KaitoroCap: A document navigation capture and visualisation tool

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: 20140521

Termination date: 20191220