CN104461574A - XML-based command line and command line program processing method thereof - Google Patents

XML-based command line and command line program processing method thereof Download PDF

Info

Publication number
CN104461574A
CN104461574A CN201410834219.1A CN201410834219A CN104461574A CN 104461574 A CN104461574 A CN 104461574A CN 201410834219 A CN201410834219 A CN 201410834219A CN 104461574 A CN104461574 A CN 104461574A
Authority
CN
China
Prior art keywords
xml
command
command line
configuration file
order line
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
CN201410834219.1A
Other languages
Chinese (zh)
Other versions
CN104461574B (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

Abstract

The invention provides an XML-based command line and a command line program processing method of the XML-based command line. The XML-based command line comprises a command line data loading module and a command line program. The command line data loading module is used for loading command line data stored in an XML configuration file. The command line program is used for dynamically analyzing the command line data in the XML configuration file and conducts execution. According to the XML-based command line and the command line program processing method of the XML-based command line, the command line data are stored in the XML configuration file, a module used for analyzing the XML configuration file is added into the command line program, and therefore the command line program can dynamically load the command line data in the running process; accordingly, the internal storage consumed in the command line progress is effectively reduced.

Description

The disposal route of a kind of order line based on XML and order line program thereof
Technical field
The present invention relates to the technical field of communication, particularly relate to the disposal route of a kind of order line based on XML and order line program thereof.
Background technology
Extend markup language (Extensible Markup Language, XML) is the subset of standard generalized markup language, is a kind ofly to make it have structural markup language for electroactive marker son file.
XML can be used for flag data, definition data type, be the source language that the markup language of a kind of user of permission to oneself defines; Be applicable to very much WWW transmission, provide unified method to describe and exchange structural data independent of application program or supplier.
Order line, as one application equipment control scheme very widely, is widely used in the equipment such as switch, router.The order line implementation of most of producer is substantially identical, is exactly by command-line data and order line program integration in order line process, as shown in Figure 1.
Command-line data and order line program integration there are in order line process relative merits clearly.
Advantage: program structure is simple, does not rely on other modules.
Shortcoming: order line process needs all command-line datas to be all loaded in internal memory initialized time, and the internal memory consumed is too high.
Picture switch, this kind equipment of router, provide order line to log in often will to multiple user.This just needs switch to open multiple order line process, and the internal memory consumed is also just higher.
Summary of the invention
The shortcoming of prior art in view of the above, the object of the present invention is to provide the disposal route of a kind of order line based on XML and order line program thereof, for solving the too high problem of internal memory that prior art order line consumes.
For achieving the above object and other relevant objects, the invention provides a kind of order line based on XML, comprise command-line data loading module and order line program; Described command-line data loading module is used for loading the command-line data being stored in XML configuration file; Described order line program is used for command-line data in dynamic analysis XML configuration file, and executive routine.
According to the above-mentioned order line based on XML, wherein: described order line program comprises program part and parsing part.
Further, according to the above-mentioned order line based on XML, wherein: described part of resolving is for the command-line data in dynamic analysis XML configuration file.
Further, according to the above-mentioned order line based on XML, wherein: described program part is for combining the command-line data parsed, executive routine.
Meanwhile, the present invention also provides a kind of disposal route of the order line program according to above-mentioned arbitrary described order line based on XML, comprises the following steps:
Step S1, wait user input top-level command;
Step S2, loading XML configuration file, the top-level command in analyzing XML configuration file;
Step S3, judge in XML configuration file top-level command in whether there is the top-level command of user's input, if not, proceed to
Step S4; If so, step S5 is proceeded to;
Step S4, prompting user, this top-level command does not exist, and flow process terminates;
Step S5, load this top-level command order line tree;
After step S6, wait user input complete order, perform this order, flow process terminates.
According to the disposal route of above-mentioned order line program, wherein: in described step S6, when performing this order, further comprising the steps of: command-line data in dynamic analysis XML configuration file.
As mentioned above, the disposal route of the order line based on XML of the present invention and order line program thereof, has following beneficial effect:
(1) command-line data is stored in XML configuration file, in order line program, increases the module of analyzing XML configuration file, make order line program can operationally dynamic load command-line data;
(2) internal memory that order line process consumes is effectively reduced.
Accompanying drawing explanation
Fig. 1 is shown as the structural representation of order line of the prior art;
Fig. 2 is shown as the structural representation of the order line based on XML of the present invention;
Fig. 3 is shown as the process flow diagram of the disposal route of order line program of the present invention.
Element numbers explanation
1 command-line data loading module
2 order line programs
Embodiment
Below by way of specific instantiation, embodiments of the present invention are described, those skilled in the art the content disclosed by this instructions can understand other advantages of the present invention and effect easily.The present invention can also be implemented or be applied by embodiments different in addition, and the every details in this instructions also can based on different viewpoints and application, carries out various modification or change not deviating under spirit of the present invention.
It should be noted that, the diagram provided in the present embodiment only illustrates basic conception of the present invention in a schematic way, then only the assembly relevant with the present invention is shown in graphic but not component count, shape and size when implementing according to reality is drawn, it is actual when implementing, and the kenel of each assembly, quantity and ratio can be a kind of change arbitrarily, and its assembly layout kenel also may be more complicated.
Of the present invention based in the order line of XML, command-line data is stored in XML configuration file, the module of analyzing XML configuration file is increased in order line program, make order line program can operationally dynamic load command-line data, thus effectively reduce the internal memory that order line process consumes.
As shown in Figure 2, the order line based on XML of the present invention comprises command-line data loading module 1 and order line program 2 two parts.
Command-line data loading module 1 is for loading the command-line data being stored in XML configuration file.
Order line program 2 comprises program part and parsing part, for command-line data in dynamic analysis XML configuration file, and executive routine.
Wherein, part is resolved for the command-line data in dynamic analysis XML configuration file.
Program part is for combining the command-line data parsed, executive routine.
Therefore, of the present invention based in the order line of XML, achieve the data of order line and being separated of program, and add the loading module to the command-line data be stored in XML configuration file.
It should be noted that, the data of how to load and to resolve in XML configuration file have been very proven technique, for conventionally known to one of skill in the art.So place repeats no more.
As shown in Figure 3, the disposal route of order line program of the present invention comprises the following steps:
Step S1, wait user input top-level command.
Step S2, loading XML configuration file, the top-level command in analyzing XML configuration file.
Step S3, judge in XML configuration file top-level command in whether there is the top-level command of user's input, if not, proceed to step S4; If so, step S5 is proceeded to.
Step S4, prompting user, this top-level command does not exist, and flow process terminates.
Step S5, load this top-level command order line tree.
After step S6, wait user input complete order, perform this order, flow process terminates.
Wherein, when performing this order, further comprising the steps of: command-line data in dynamic analysis XML configuration file.Namely order line program operationally, the command-line data in dynamic analysis XML configuration file, and combine the command-line data parsed, executive routine.
In sum, command-line data is stored in XML configuration file by the disposal route of the order line based on XML of the present invention and order line program thereof, in order line program, increase the module of analyzing XML configuration file, make order line program can operationally dynamic load command-line data; Effectively reduce the internal memory that order line process consumes.So the present invention effectively overcomes various shortcoming of the prior art and tool high industrial utilization.
Above-described embodiment is illustrative principle of the present invention and effect thereof only, but not for limiting the present invention.Any person skilled in the art scholar all without prejudice under spirit of the present invention and category, can modify above-described embodiment or changes.Therefore, such as have in art usually know the knowledgeable do not depart from complete under disclosed spirit and technological thought all equivalence modify or change, must be contained by claim of the present invention.

Claims (6)

1. based on an order line of XML, it is characterized in that: comprise command-line data loading module and order line program;
Described command-line data loading module is used for loading the command-line data being stored in XML configuration file;
Described order line program is used for command-line data in dynamic analysis XML configuration file, and executive routine.
2. the order line based on XML according to claim 1, is characterized in that: described order line program comprises program part and parsing part.
3. the order line based on XML according to claim 2, is characterized in that: described part of resolving is for the command-line data in dynamic analysis XML configuration file.
4. the order line based on XML according to claim 2, is characterized in that: described program part is for combining the command-line data parsed, executive routine.
5., according to a disposal route for the order line program of the order line based on XML one of claim 1-4 Suo Shu, it is characterized in that: comprise the following steps:
Step S1, wait user input top-level command;
Step S2, loading XML configuration file, the top-level command in analyzing XML configuration file;
Step S3, judge in XML configuration file top-level command in whether there is the top-level command of user's input, if not, proceed to step S4; If so, step S5 is proceeded to;
Step S4, prompting user, this top-level command does not exist, and flow process terminates;
Step S5, load this top-level command order line tree;
After step S6, wait user input complete order, perform this order, flow process terminates.
6. the disposal route of order line program according to claim 5, is characterized in that: in described step S6, when performing this order, further comprising the steps of: command-line data in dynamic analysis XML configuration file.
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 true CN104461574A (en) 2015-03-25
CN104461574B 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)

Cited By (3)

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

Citations (5)

* 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
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)

Patent Citations (5)

* 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
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)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105847041A (en) * 2016-03-18 2016-08-10 烽火通信科技股份有限公司 Interactive method based on command line data of network management system
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
CN105893089A (en) * 2016-03-30 2016-08-24 国云科技股份有限公司 Linux command line packaging method
CN105893089B (en) * 2016-03-30 2019-05-21 国云科技股份有限公司 A kind of packaging method of Linux command row

Also Published As

Publication number Publication date
CN104461574B (en) 2018-06-19

Similar Documents

Publication Publication Date Title
KR102185864B1 (en) Server-side rendering method and system of native content for presentation
US20180032375A1 (en) Data Processing Method and Apparatus
US9471651B2 (en) Adjustment of map reduce execution
CN104866327B (en) A kind of PHP development approaches and framework
US9015672B2 (en) Interface simulator for test rig in data distribution service
JP2014521184A5 (en)
CN102665231B (en) Method of automatically generating parameter configuration file for LTE (Long Term Evolution) system
US8839197B2 (en) Automated analysis of composite applications
US9182953B2 (en) Hybrid dynamic code compiling device, method, and service system thereof
CN103136201A (en) Page information display method and page information display device
US20200272558A1 (en) Automated layout testing for mobile device applications
US9372787B2 (en) System and method for automating testing
CN103064680B (en) The player method of plug-in unit and device in browser
US20180088915A1 (en) Application-type independent dynamic plug-in evaluation tool
CN104954894A (en) Video traffic guiding method and device as well as electronic equipment
CN104461574A (en) XML-based command line and command line program processing method thereof
CN104331284A (en) Method and system for generating and displaying dynamic page
RU2015102084A (en) METHOD FOR PROVIDING FUNCTIONS IN THE INDUSTRIAL AUTOMATION SYSTEM AND THE INDUSTRIAL AUTOMATION SYSTEM
US20180025162A1 (en) Application program analysis apparatus and method
US8732657B2 (en) OData consumption tool
US9336247B2 (en) Control data driven modifications and generation of new schema during runtime operations
EP2631791A1 (en) Method and apparatus for analyzing application program by analysis of source code
CN105917307B (en) User interface frame
CN103077047B (en) A kind of plug-in playback method and device
CN108446232A (en) Introducing method, device, computing device and the storage medium of self-defined detected rule

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

Granted publication date: 20180619

Termination date: 20181223

CF01 Termination of patent right due to non-payment of annual fee