CN104461574B - A kind of order line processing unit and method based on XML - Google Patents

A kind of order line processing unit and method based on XML Download PDF

Info

Publication number
CN104461574B
CN104461574B CN201410834219.1A CN201410834219A CN104461574B CN 104461574 B CN104461574 B CN 104461574B CN 201410834219 A CN201410834219 A CN 201410834219A CN 104461574 B CN104461574 B CN 104461574B
Authority
CN
China
Prior art keywords
order line
command
order
xml
program
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
CN201410834219.1A
Other languages
Chinese (zh)
Other versions
CN104461574A (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.)
Shanghai Feixun Data Communication Technology Co Ltd
Original Assignee
Shanghai Feixun Data Communication Technology 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 Shanghai Feixun Data Communication Technology Co Ltd filed Critical Shanghai Feixun Data Communication Technology Co Ltd
Priority to CN201410834219.1A priority Critical patent/CN104461574B/en
Publication of CN104461574A publication Critical patent/CN104461574A/en
Application granted granted Critical
Publication of CN104461574B publication Critical patent/CN104461574B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

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

Abstract

The present invention provides a kind of processing method of order line and its order line program based on XML, including command-line data loading module and order line program;The command-line data loading module is used to be loaded the command-line data for being stored in XML configuration file;The order line program is used for command-line data in dynamic analysis XML configuration file, and performs program.The order line based on XML of the present invention and its processing method of order line program will be in command-line data storages to XML configuration file, increase the module of parsing XML configuration file in order line program so that order line program being capable of dynamic load command-line data at runtime;Effectively reduce the memory that order line process is consumed.

Description

A kind of order line processing unit and method based on XML
Technical field
The present invention relates to the technical field of communication, more particularly to a kind of order line based on XML and its order line program Processing method.
Background technology
Extensible markup language (Extensible Markup Language, XML) is the son of standard generalized markup language Collection is a kind of for electronic document to be marked to make it have structural markup language.
XML can be used for flag data, define data type, be that a kind of permission user determines the markup language of oneself The original language of justice;WWW transmission is very suitable for, provides unified method to describe and exchange independently of application program or supply The structural data of quotient.
Order line is widely used in the equipment such as interchanger, router as a kind of widely used equipment management scheme In.The order line implementation of most of producers is essentially identical, is exactly ordering command-line data and order line program integration In traveling journey, as shown in Figure 1.
Command-line data and order line program integration there are into apparent advantage and disadvantage in order line process.
Advantage:Program structure is simple, independent of other modules.
Shortcoming:Order line process needs all command-line datas being all loaded into memory when initialization, institute The memory of consumption is too high.
As interchanger, router this kind equipment, multiple users often to be given to provide order line and be logged in.This just needs interchanger Multiple order line processes are opened, the memory consumed is also with regard to higher.
Invention content
In view of the foregoing deficiencies of prior art, at the purpose of the present invention is to provide a kind of order line based on XML Device and method is managed, for solving the problems, such as that the memory that prior art order line is consumed is excessively high.
In order to achieve the above objects and other related objects, the present invention provides a kind of order line processing unit based on XML, packet Include command-line data loading module and order line program;The command-line data loading module is used for being stored in XML configuration texts The command-line data of part is loaded;The order line program is used for command-line data in dynamic analysis XML configuration file, and holds Line program.
According to the above-mentioned order line processing unit based on XML, wherein:The order line program is conciliate including program part Analyse part.
Further, according to the above-mentioned order line processing unit based on XML, wherein:The parsing part is for dynamic Parse the command-line data in XML configuration file.
Further, according to the above-mentioned order line processing unit based on XML, wherein:Described program part is used to combine The command-line data parsed performs program.
Meanwhile the present invention also provides a kind of orders according to any of the above-described order line processing unit based on XML Row processing method, includes the following steps:
Step S1, user is waited for input top-level command;
Step S2, XML configuration file is loaded, parses the top-level command in XML configuration file;
Step S3, judge with the presence or absence of top-level command input by user in the top-level command in XML configuration file, if it is not, It is transferred to
Step S4;If so, it is transferred to step S5;
Step S4, user is prompted, which is not present, and flow terminates;
Step S5, the order line tree of the top-level command is loaded;
Step S6, after user being waited for input complete order, the order is performed, flow terminates.
According to above-mentioned order line processing method, wherein:In the step S6, when performing the order, further include following Step:Command-line data in dynamic analysis XML configuration file.
As described above, the order line and its order line processing method based on XML of the present invention, has the advantages that:
(1) command-line data is stored into XML configuration file, increases parsing XML configuration file in order line program Module so that order line program being capable of dynamic load command-line data at runtime;
(2) memory that order line process is consumed is effectively reduced.
Description of the drawings
Fig. 1 is shown as the structure diagram of order line of the prior art;
Fig. 2 is shown as the structure diagram of the order line based on XML of the present invention;
Fig. 3 is shown as the flow chart of the processing method of the order line program of the present invention.
Component label instructions
1 command-line data loading module
2 order line programs
Specific embodiment
Illustrate embodiments of the present invention below by way of specific specific example, those skilled in the art can be by this specification Disclosed content understands other advantages and effect of the present invention easily.The present invention can also pass through in addition different specific realities The mode of applying is embodied or practiced, the various details in this specification can also be based on different viewpoints with application, without departing from Various modifications or alterations are carried out under the spirit of the present invention.
It should be noted that the diagram provided in the present embodiment only illustrates the basic conception of the present invention in a schematic way, Then in schema only display with it is of the invention in related component rather than component count, shape and size during according to actual implementation paint System, kenel, quantity and the ratio of each component can be a kind of random change, and its assembly layout kenel also may be used during actual implementation It can be increasingly complex.
In the order line processing unit based on XML of the present invention, command-line data is stored into XML configuration file, Increase the module of parsing XML configuration file in order line program so that order line program being capable of dynamic load order at runtime Row data, so as to effectively reduce the memory that order line process is consumed.
As shown in Fig. 2, the order line processing unit based on XML of the present invention includes command-line data loading module 1 and life Enable 2 two parts of line program.
Command-line data loading module 1 is used to be loaded the command-line data for being stored in XML configuration file.
Order line program 2 includes program part and parsing part, for order line number in dynamic analysis XML configuration file According to, and perform program.
Wherein, parsing part is for the command-line data in dynamic analysis XML configuration file.
Program part is used to combine the command-line data parsed, performs program.
Therefore, in the order line processing unit based on XML of the present invention, the data of order line and point of program are realized From, and increase the loading module to being stored in the command-line data in XML configuration file.
It should be noted that how to load and parse the data in XML configuration file has been very ripe technology, for this Well known to field technology personnel.Therefore details are not described herein again.
As shown in figure 3, the order line processing method of the present invention includes the following steps:
Step S1, user is waited for input top-level command.
Step S2, XML configuration file is loaded, parses the top-level command in XML configuration file.
Step S3, judge with the presence or absence of top-level command input by user in the top-level command in XML configuration file, if it is not, It is transferred to step S4;If so, it is transferred to step S5.
Step S4, user is prompted, which is not present, and flow terminates.
Step S5, the order line tree of the top-level command is loaded.
Step S6, after user being waited for input complete order, the order is performed, flow terminates.
Wherein, it is further comprising the steps of when performing the order:Command-line data in dynamic analysis XML configuration file.I.e. Order line program at runtime, the command-line data in dynamic analysis XML configuration file, and combine the order line number that parses According to execution program.
In conclusion command-line data is stored to XML and matched by the order line processing unit based on XML of the present invention and processing It puts in file, increases the module of parsing XML configuration file in order line program so that order line program can move at runtime State loading command row data;Effectively reduce the memory that order line process is consumed.So the present invention effectively overcome it is existing Various shortcoming in technology and have high industrial utilization.
The above-described embodiments merely illustrate the principles and effects of the present invention, and is not intended to limit the present invention.It is any ripe The personage for knowing this technology all can carry out modifications and changes under the spirit and scope without prejudice to the present invention to above-described embodiment.Cause This, those of ordinary skill in the art is complete without departing from disclosed spirit and institute under technological thought such as Into all equivalent modifications or change, should by the present invention claim be covered.

Claims (5)

1. a kind of order line processing method, it is characterised in that:Include the following steps:
Step S1, user is waited for input top-level command;
Step S2, XML configuration file is loaded, parses the top-level command in XML configuration file;
Step S3, judge with the presence or absence of top-level command input by user in the top-level command in XML configuration file, if it is not, being transferred to Step S4;If so, it is transferred to step S5;
Step S4, user is prompted, which is not present, and flow terminates;
Step S5, the order line tree of the top-level command is loaded;
Step S6, after user being waited for input complete order, the order is performed, flow terminates;
It is further comprising the steps of when performing the order in the step S6:Order line number in dynamic analysis XML configuration file According to.
2. a kind of order line processing unit based on XML is used to implement order line processing method described in claim 1, special Sign is:Order line process includes command-line data loading module and order line program;
The command-line data loading module is for the order when the order line program is run to being stored in XML configuration file Row data are loaded;
The order line program performs program for command-line data in dynamic analysis XML configuration file at runtime.
3. the order line processing unit according to claim 2 based on XML, it is characterised in that:The order line program bag Include program part and parsing part.
4. the order line processing unit according to claim 3 based on XML, it is characterised in that:The parsing part is used for Command-line data in dynamic analysis XML configuration file.
5. the order line processing unit according to claim 3 based on XML, it is characterised in that:Described program part is used for With reference to the command-line data parsed, program is performed.
CN201410834219.1A 2014-12-23 2014-12-23 A kind of order line processing unit and method based on XML Expired - Fee Related CN104461574B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410834219.1A CN104461574B (en) 2014-12-23 2014-12-23 A kind of order line processing unit and method based on XML

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410834219.1A CN104461574B (en) 2014-12-23 2014-12-23 A kind of order line processing unit and method based on XML

Publications (2)

Publication Number Publication Date
CN104461574A CN104461574A (en) 2015-03-25
CN104461574B true CN104461574B (en) 2018-06-19

Family

ID=52907685

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410834219.1A Expired - Fee Related CN104461574B (en) 2014-12-23 2014-12-23 A kind of order line processing unit and method based on XML

Country Status (1)

Country Link
CN (1) CN104461574B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105847041B (en) * 2016-03-18 2019-06-07 烽火通信科技股份有限公司 A kind of exchange method based on network management system command-line data
CN105847044A (en) * 2016-03-21 2016-08-10 上海斐讯数据通信技术有限公司 Command line processing apparatus and method based on JavaScript
CN105893089B (en) * 2016-03-30 2019-05-21 国云科技股份有限公司 A kind of packaging method of Linux command row

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101110703A (en) * 2007-06-28 2008-01-23 中兴通讯股份有限公司 Made-to-order command line implementing method and system
CN101119522A (en) * 2007-08-22 2008-02-06 中兴通讯股份有限公司 Method for simulating AT command report
CN101546264A (en) * 2009-04-27 2009-09-30 成都市华为赛门铁克科技有限公司 command line processing method, device and communication system
CN103559296A (en) * 2013-11-04 2014-02-05 中国电子科技集团公司第四十一研究所 XML-based parsing method for SCPI (The Standard Commands for Programmable Instruments)

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030163570A1 (en) * 2002-02-26 2003-08-28 Sun Microsystems, Inc. Command line interface session tool

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101110703A (en) * 2007-06-28 2008-01-23 中兴通讯股份有限公司 Made-to-order command line implementing method and system
CN101119522A (en) * 2007-08-22 2008-02-06 中兴通讯股份有限公司 Method for simulating AT command report
CN101546264A (en) * 2009-04-27 2009-09-30 成都市华为赛门铁克科技有限公司 command line processing method, device and communication system
CN103559296A (en) * 2013-11-04 2014-02-05 中国电子科技集团公司第四十一研究所 XML-based parsing method for SCPI (The Standard Commands for Programmable Instruments)

Also Published As

Publication number Publication date
CN104461574A (en) 2015-03-25

Similar Documents

Publication Publication Date Title
Zou et al. SNiPER: an offline software framework for non-collider physics experiments
CN104461574B (en) A kind of order line processing unit and method based on XML
US8839197B2 (en) Automated analysis of composite applications
CN102982169B (en) Browser and method for isolating webpage plugins
CN104331315B (en) A kind of parsing of arbitrary levels json objects and generation method and system
WO2010045569A3 (en) Interactive design environments to visually model, debug and execute resource oriented programs
Künzle Object-aware process management
CN108874464A (en) Middleware automatically scanning assembly method, device and storage medium
CN108829884A (en) data mapping method and device
CN102902576A (en) Method, server and system for rendering webpages
Ni et al. Model transformation and formal verification for Semantic Web Services composition
CN104811403B (en) Group list processing method, apparatus and group table configuration unit based on open flows
CN103279061A (en) Interface extensible programming method based on DSP platform
CN106909435A (en) A kind of analysis method and device of Network Security Device order line
CN103309782A (en) Burning and testing integrated system
CN108170424A (en) A kind of self extended method and system based on cloud knowledge base
CN105338104B (en) Service request response method, parsing method and system
MX2016011886A (en) Application workflow framework.
CN106776275A (en) A kind of testing process automatic generation method based on Packet Multiplexing
CN102857375A (en) Method for managing and explaining communication protocols
CN109408577A (en) ORACLE database JSON analytic method, system, device and can storage medium
CN110083355A (en) A kind of processing method and processing device of the APP page
CN105260317B (en) A kind of choosing method of test case
CN103530227B (en) A kind of open Script Programming system
CN108123844A (en) It is distributed across a network formula test method and system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
EXSB Decision made by sipo to initiate substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
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: 20180619

Termination date: 20181223