CN101211336A - Visualized system and method for generating inquiry file - Google Patents

Visualized system and method for generating inquiry file Download PDF

Info

Publication number
CN101211336A
CN101211336A CNA2006100646033A CN200610064603A CN101211336A CN 101211336 A CN101211336 A CN 101211336A CN A2006100646033 A CNA2006100646033 A CN A2006100646033A CN 200610064603 A CN200610064603 A CN 200610064603A CN 101211336 A CN101211336 A CN 101211336A
Authority
CN
China
Prior art keywords
file
xml
xml document
document dbject
dbject model
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
CNA2006100646033A
Other languages
Chinese (zh)
Other versions
CN101211336B (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.)
Hongfujin Precision Industry Shenzhen Co Ltd
Hon Hai Precision Industry Co Ltd
Original Assignee
Hongfujin Precision Industry Shenzhen Co Ltd
Hon Hai Precision Industry 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 Hongfujin Precision Industry Shenzhen Co Ltd, Hon Hai Precision Industry Co Ltd filed Critical Hongfujin Precision Industry Shenzhen Co Ltd
Priority to CN2006100646033A priority Critical patent/CN101211336B/en
Priority to US11/930,169 priority patent/US20080163077A1/en
Publication of CN101211336A publication Critical patent/CN101211336A/en
Application granted granted Critical
Publication of CN101211336B publication Critical patent/CN101211336B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/80Information retrieval; Database structures therefor; File system structures therefor of semi-structured data, e.g. markup language structured data such as SGML, XML or HTML
    • G06F16/84Mapping; Conversion
    • G06F16/88Mark-up to mark-up conversion
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/903Querying
    • G06F16/9032Query formulation

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Computational Linguistics (AREA)
  • Information Transfer Between Computers (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

A system for visually generating query files comprises a file model construction module for modifying the content of a webpage opened via accessing the network by a user into an XML file object model which complies with XML grammar specification and is a standard W3C file object model; a visual editing module for presenting the webpage as a visual and editable base assembly; an XPath expression generation module for analyzing the base assembly selected by the user on the editable webpage and generating an XPath expression according to the position of the base assembly in the XML file object model; and a query file combination module for combining a query file meeting an Xquery standard according to the position relationship of each generated XPath expression in the XML file object model. The invention also provides a method for visually generating query files. The invention enables the users to visually select the extract content according to requirements, and is able to automatically analyze the selected content to generate the XPath expressions and to combine the XPath expressions into a query file.

Description

The system and method for visual generated query file
Technical field
The present invention relates to a kind of system and method for visual generated query file.
Background technology
W3C (World Wide Web Consortium) standard has become the first-selection of high-end customer design website at present.This standard is the international universal standard, meets the website of this standard, can browse your website with any browser.Such as, we know among the domestic net user, use the many of IE browser, but from domestic or global online client, some client is not with the IE content that surfs the web, they use some other browser as Netscape, Mozilla, FireFox, Opera etc., if what adopted the website is not the W3C standard, use the user of other browser so, just can't see this website.
W3C has XML Path Language (XPath) Version 1.0 standards, and XPath is that the language of W3C definition and formal W3C recommend, and the XPath language provides simple, the succinct grammer that is used for selecting from XML document node.XPath also provides the rule that the node in XML document dbject model (DOM, the Document Object Model) tree is converted to Boolean, double value or string value.Xpath is the grammer of a kind of non-XML, and it can be used for the 3rd address (address) element in the locating file.
Document dbject model is that (ApplicationProgramming Interface API), regards the XML file as a kind of nido object set of different attribute to a kind of application programming interface based on dendrogram.It is object that the XML document dbject model is all treated as the basic module on the webpage (as figure, literal, form), as long as set an ID (identification title) for label, just can it use as object in use.Therefore, the Web page maker is when writing the Html file, as long as be ID of label setting, just the content that the Html label can be indicated is used as object and is used.DOM is the standard that W3C works out, and purpose is being set up a kind of common mode, allows program file can be come access as a group objects well.
XQuery is the query language that is used for extracting from the XML file single project or one group of project.The relation that concerns erect image SQL and relational database of XQuery and XML.
Originally writing the Xquery file is the edit mode that adopts text mostly, writes very inconvenience of query webpage data.
Summary of the invention
In view of above content, the invention provides a kind of system of visual generated query file, this system installs on computers, and the user is by this computer access network.This system comprises: file model is set up module, is used for the web page contents that customer access network is opened is revised as the XML document dbject model that meets XML grammer specification the W3C document dbject model that this XML document dbject model is a standard; The visual edit module is used for above-mentioned webpage is appeared as visual and editable basic module; XPath expression formula generation module is used for basic module that analysis user chooses and generates the Xpath expression formula according to described basic module in the position of XML document dbject model on above-mentioned editable webpage; The inquiry file synthesis module is used for becoming an inquiry file that meets the Xquery standard according to each the XPath expression formula that generates at the position of XML document dbject model composition of relations.
The present invention also provides a kind of method of visual generated query file, and the method comprising the steps of: a web page files is revised as the XML document dbject model that meets XML grammer specification, the W3C document dbject model that this XML document dbject model is a standard; Basic module on this webpage is shown as editable state; Receive user's selected basic module that needs extraction on the Webpage of this visual edit state successively, analyze the position of described each basic module in above-mentioned XML document dbject model, generate the XPath expression formula of each basic module correspondence according to the position of analyzing; According to above-mentioned each XPath expression formula in this XML document dbject model the position composition of relations become an inquiry file that meets the Xquery standard.
The present invention can make the user according to the visual selective extraction content of demand, analyzes automatically and chooses content to generate the XPath expression formula, and the XPath expression formula that will generate is again synthesized an inquiry file, makes things convenient for the operation of user's subsequent query.
Description of drawings
Fig. 1 is the functional block diagram of the system of the visual generated query file of the present invention.
Fig. 2 is the process flow diagram of the preferred embodiment of the method for the visual generated query file of the present invention.
Fig. 3 is the synoptic diagram of a visual edit page of the visual generated query file system of the present invention.
Embodiment
Consult shown in Figure 1ly, be the functional block diagram of the system of the visual generated query file of the present invention.This system 11 operates in the computing machine 10, and this computing machine 10 connects internets, and the user can be by this computing machine 10 webpage that surfs the web.Wherein, this system 11 comprises that file model sets up module 111, visual edit module 112, XPath expression formula generation module 113 and inquiry file synthesis module 114.
This document model building module 111 be used for according to the web page contents that the user opens set up the XML document dbject model (Document Object Model, DOM), the W3C document dbject model that this XML document dbject model is a standard.
Wherein, the web page contents that the user opens is a Html file, and Html is a general format of making hyperlink file (Hypertext) at present on Web.And then to utilize XHtml (The eXtensible Hypertext Markup Language) be the XML document dbject model that meets XML grammer specification with this Html file modification, and this XML document dbject model is the W3C document dbject model of standard.On behalf of the program design object of different basic modules in the XML file, this XML document dbject model formed by one group, and its tree data structure with hierarchy type stores this XML file data.It is object that this XML document dbject model is all treated as the basic module on the webpage, and this basic module comprises figure, literal, form.Wherein DOM is the standard that W3C works out, and purpose is being set up a kind of common mode, can allow program file can be come access as a group objects easily.Originally in computing machine, information communication is formed a group objects, but is regarded as a file when transmission.
In the XML document dbject model, will represent the program design object of XML file, be called node (nodes).When Internet Explorer 5 handled the XML file that is linked and is stored in the XML document dbject model, it can set up a node for each basic module of XML file.These basic modules have comprised element, attribute, and the XML document dbject model can use the node of different shape to represent basic module in the XML file of different shape.For example, element is to be stored in the Element node, and attribute then is to be stored in the Attribute node.
The title that can the nodeName attribute from node obtains each node.This title is initial with character #, represents the standard name of the basic module node in those XML files of not naming hereof.For example, the annotations and comments in the XML file are also unnamed, and therefore, the XML document dbject model will use standard name #comment.The title of other node then is to be derived by the title that is assigned to corresponding basic module in the XML file.
Can also obtain the nodal value of each node from the nodeValue attribute of node.If the XML basic module has a relevant value, attribute for example, this value will be stored in the nodal value of node.If the XML basic module does not have nodal value, element for example, then the XML document dbject model will be set as null to nodal value.
The XML document dbject model is construed as tree-shaped hierarchical structure with the node of XML file, reflects the hierarchical structure of XML file itself.The XML document dbject model will be set up a single Archive sit and represent whole XML file, and it is considered as the root node of hierarchical structure.The logic hierarchical structure of XML element has comprised whole XML file; Root node in the structure, just a branch of the hierarchical structure of node in the XML document dbject model.Each node just as the object of programmable, provides attribute and method, allows you can access, demonstration, management and obtain the information that corresponds on the XML basic module.
This visual edit module 112 is used for above-mentioned webpage is appeared as visual and editable basic module, the figure, form (table), field basic modules such as (field) that are about on this correspondence Webpage are presented in face of the user with the edit mode of What You See Is What You Get, and the basic module in basic module on this webpage and the described XML document dbject model is one to one.Seeing shown in Figure 3ly, is the visual edit form of a webpage.
This XPath expression formula generation module 113 is used for basic module that analysis user chooses and generates the Xpath expression formula according to this basic module in the position of the XML of described this webpage correspondence document dbject model (DOM) on above-mentioned editable webpage.As a selected basic module in Fig. 3, this Xpath expression formula generation module 113 is analyzed this basic module residing node (node) position in described XML document dbject model, adopt the method for recurrence, from this node location successively up recurrence seek the father node of this node, up to the root node place that finds this XML document dbject model.Xpath is a W3C general polling linguistic norm, is used for some part of XML file is carried out addressing.
This inquiry file synthesis module 114 is used for becoming one to meet Xquery normative text file according to each the XPath expression formula that generates at the position of described XML document dbject model composition of relations, and text file promptly is needed inquiry file.
Consult shown in Figure 2ly, be the process flow diagram of the preferred embodiment of the method for the visual generated query file of the present invention.At first, step S300, user open a web page files, and this web page files is a Html file.
Step S302, file model set up module 111 this Html web page files are revised as the XML document dbject model that meets XML grammer specification, and this XML document dbject model is the W3C document dbject model of standard.This XML document dbject model stores the XML file data with the tree data structure of hierarchy type.In setting up the file model process, the node of this XML file is constructed as tree-shaped hierarchical structure, reflects the hierarchical structure of XML file itself.Wherein set up a single Archive sit and represent whole XML file, and it is considered as the root node of hierarchical structure.The logic hierarchical structure of XML element has comprised whole XML file; Root node in the structure, just a branch of the hierarchical structure of node in this XML document dbject model.Each node just as the object of programmable, provides attribute and method, allows you can access, demonstration, management and obtain the information that corresponds on the XML assembly.
Step S304, visual edit module 112 shows as editable state with the assembly on this Html webpage such as figure, literal, form, field etc., as shown in Figure 3.
Step S306, user need to select the basic module of extraction on the Webpage of this visual edit state, as figure, literal or form.
Step S308, XPath expression formula generation module 113 receives user-selected basic module, analyze the position of this basic module in above-mentioned XML document dbject model, that is to say and analyze this selected basic module particular location in the tree data structure of described hierarchy type.As the method that adopts recurrence seeks the father node of this basic module institute corresponding node in this XML document dbject model, up to the root node place that finds this XML document dbject model.Generate the XPath expression formula of this basic module again according to the position of this basic module of being analyzed.Need select a plurality of basic modules as if the user, then repeating step S306 and step S308.
Step S310, inquiry file generation module 114 becomes one to meet Xquery normative text file according to the position composition of relations of above-mentioned each XPath expression formula in the XML document dbject model, and text file promptly is needed inquiry file.

Claims (6)

1. the system of a visual generated query file, this system installs on computers, and the user is characterized in that by this computer access network this system comprises:
File model is set up module, is used for the web page contents that customer access network is opened is revised as the XML document dbject model that meets XML grammer specification the W3C document dbject model that this XML document dbject model is a standard;
The visual edit module is used for above-mentioned webpage is appeared as visual and editable basic module;
XPath expression formula generation module is used for basic module that analysis user chooses and generates the Xpath expression formula according to described basic module in the position of XML document dbject model on above-mentioned editable webpage;
The inquiry file synthesis module is used for becoming an inquiry file that meets the Xquery standard according to each the XPath expression formula that generates at the position of XML document dbject model composition of relations.
2. the system of visual generated query file as claimed in claim 1 is characterized in that, this XML document dbject model stores the XML file data with the tree data structure of hierarchy type, and the node of this tree data structure is represented the basic module of XML file.
3. the system of visual generated query file as claimed in claim 2, it is characterized in that, this XPath expression formula generation module adopts the method for recurrence to search the father node of the node of selected basic module correspondence in this XML document dbject model, up to the root node of this XML document dbject model.
4. the method for a visual generated query file is characterized in that, the method comprising the steps of:
A web page files is revised as the XML document dbject model that meets XML grammer specification, the W3C document dbject model that this XML document dbject model is a standard;
Basic module on this webpage is shown as editable state;
Receive user's selected basic module that needs extraction on the Webpage of this visual edit state successively, analyze the position of described each basic module in above-mentioned XML document dbject model, generate the XPath expression formula of each basic module correspondence according to the position of analyzing;
According to above-mentioned each XPath expression formula in this XML document dbject model the position composition of relations become an inquiry file that meets the Xquery standard.
5. the method for visual generated query file as claimed in claim 4 is characterized in that, this XML document dbject model stores the XML file data with the tree data structure of hierarchy type, and the node of this tree data structure is represented the basic module of XML file.
6. the method for visual generated query file as claimed in claim 5 is characterized in that, the method comprising the steps of:
The method of employing recurrence is searched the father node of the node of selected basic module correspondence in this XML document dbject model, up to the root node of this XML document dbject model.
CN2006100646033A 2006-12-29 2006-12-29 Visualized system and method for generating inquiry file Expired - Fee Related CN101211336B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN2006100646033A CN101211336B (en) 2006-12-29 2006-12-29 Visualized system and method for generating inquiry file
US11/930,169 US20080163077A1 (en) 2006-12-29 2007-10-31 System and method for visually generating an xquery document

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2006100646033A CN101211336B (en) 2006-12-29 2006-12-29 Visualized system and method for generating inquiry file

Publications (2)

Publication Number Publication Date
CN101211336A true CN101211336A (en) 2008-07-02
CN101211336B CN101211336B (en) 2011-05-04

Family

ID=39585824

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2006100646033A Expired - Fee Related CN101211336B (en) 2006-12-29 2006-12-29 Visualized system and method for generating inquiry file

Country Status (2)

Country Link
US (1) US20080163077A1 (en)
CN (1) CN101211336B (en)

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101763263A (en) * 2010-01-04 2010-06-30 山东浪潮齐鲁软件产业股份有限公司 Configuration method of business assembly visualization development tool based on web
CN102135976A (en) * 2010-09-27 2011-07-27 华为技术有限公司 Hypertext markup language page structured data extraction method and device
WO2012012950A1 (en) * 2010-07-30 2012-02-02 Hewlett-Packard Development Company, L.P. Method for selecting user desirable content from web pages
CN102750265A (en) * 2011-08-26 2012-10-24 新奥特(北京)视频技术有限公司 Method and device for data replacing
CN102760167A (en) * 2012-06-13 2012-10-31 上海方正数字出版技术有限公司 XQuery query path optimization method based on particle swarm optimization
CN102929497A (en) * 2011-09-12 2013-02-13 微软公司 Virtual viewport and fixed positioning with optical zoom
CN103810153A (en) * 2014-02-17 2014-05-21 深圳市世纪安软信息技术有限公司 Temperature measurement form generation method and device for temperature measurement terminal and temperature measurement system
CN105224531A (en) * 2014-05-28 2016-01-06 腾讯科技(深圳)有限公司 The method and apparatus of localization of XML node
CN105808260A (en) * 2016-03-10 2016-07-27 成都神秘方块科技有限公司 Logic node tree-shaped visual game editing engine
CN107437158A (en) * 2016-05-26 2017-12-05 北京京东尚科信息技术有限公司 Data query method and apparatus based on browser plug-in

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9720811B2 (en) * 2011-06-29 2017-08-01 Red Hat, Inc. Unified model for visual component testing
CN105022757A (en) * 2014-04-29 2015-11-04 腾讯科技(深圳)有限公司 Webpage revision method and webpage revision device

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6538673B1 (en) * 1999-08-23 2003-03-25 Divine Technology Ventures Method for extracting digests, reformatting, and automatic monitoring of structured online documents based on visual programming of document tree navigation and transformation
US7668913B1 (en) * 1999-11-05 2010-02-23 Decentrix, Inc. Method and apparatus for generating a web site with dynamic content data from an external source integrated therein
US20030088639A1 (en) * 2001-04-10 2003-05-08 Lentini Russell P. Method and an apparatus for transforming content from one markup to another markup language non-intrusively using a server load balancer and a reverse proxy transcoding engine
EP1430420A2 (en) * 2001-05-31 2004-06-23 Lixto Software GmbH Visual and interactive wrapper generation, automated information extraction from web pages, and translation into xml
EP1435046A2 (en) * 2001-08-03 2004-07-07 Koninklijke Philips Electronics N.V. Method of and system for updating a document
US7016915B2 (en) * 2002-12-28 2006-03-21 International Business Machines Corporation Method for processing XML queries over relational data and meta-data using a relational database system
US7451392B1 (en) * 2003-06-30 2008-11-11 Microsoft Corporation Rendering an HTML electronic form by applying XSLT to XML using a solution
US20070245232A1 (en) * 2004-04-08 2007-10-18 Nobuaki Wake Apparatus for Processing Documents That Use a Mark Up Language

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101763263A (en) * 2010-01-04 2010-06-30 山东浪潮齐鲁软件产业股份有限公司 Configuration method of business assembly visualization development tool based on web
WO2012012950A1 (en) * 2010-07-30 2012-02-02 Hewlett-Packard Development Company, L.P. Method for selecting user desirable content from web pages
CN102135976B (en) * 2010-09-27 2013-12-18 华为技术有限公司 Hypertext markup language page structured data extraction method and device
CN102135976A (en) * 2010-09-27 2011-07-27 华为技术有限公司 Hypertext markup language page structured data extraction method and device
CN102750265A (en) * 2011-08-26 2012-10-24 新奥特(北京)视频技术有限公司 Method and device for data replacing
CN102929497A (en) * 2011-09-12 2013-02-13 微软公司 Virtual viewport and fixed positioning with optical zoom
US9588679B2 (en) 2011-09-12 2017-03-07 Microsoft Technology Licensing, Llc Virtual viewport and fixed positioning with optical zoom
CN102760167A (en) * 2012-06-13 2012-10-31 上海方正数字出版技术有限公司 XQuery query path optimization method based on particle swarm optimization
CN102760167B (en) * 2012-06-13 2014-07-23 北大方正集团有限公司 XQuery query path optimization method based on particle swarm optimization
CN103810153A (en) * 2014-02-17 2014-05-21 深圳市世纪安软信息技术有限公司 Temperature measurement form generation method and device for temperature measurement terminal and temperature measurement system
CN105224531A (en) * 2014-05-28 2016-01-06 腾讯科技(深圳)有限公司 The method and apparatus of localization of XML node
CN105808260A (en) * 2016-03-10 2016-07-27 成都神秘方块科技有限公司 Logic node tree-shaped visual game editing engine
CN107437158A (en) * 2016-05-26 2017-12-05 北京京东尚科信息技术有限公司 Data query method and apparatus based on browser plug-in

Also Published As

Publication number Publication date
CN101211336B (en) 2011-05-04
US20080163077A1 (en) 2008-07-03

Similar Documents

Publication Publication Date Title
CN101211336B (en) Visualized system and method for generating inquiry file
Ngu et al. Semantic-based mashup of composite applications
US6732102B1 (en) Automated data extraction and reformatting
US7370061B2 (en) Method for querying XML documents using a weighted navigational index
US20070078889A1 (en) Method and system for automated knowledge extraction and organization
CN100422997C (en) Method of adding searchable deep labels in web pages in conjunction with browser plug-ins and scripts
CN100449485C (en) Information processing apparatus and information processing method
US20050198567A1 (en) Web navigation method and system
CN101344881A (en) Index generation method and device and search system for mass file type data
WO2001050349A1 (en) Electronic document customization and transformation utilizing user feedback
CN101073076A (en) Document processing and management approach for creating a tag or an attribute in a markup language document, and method thereof
JP5113764B2 (en) Transfer and display hierarchical data between databases and electronic documents
Jiang et al. Towards reengineering web sites to web-services providers
US20060031771A1 (en) Method and code module for facilitating navigation between webpages
Qureshi et al. Determining the complexity of XML documents
KR100522186B1 (en) Methods for dynamically building the home page and Apparatus embodied on the web therefor
Saputra et al. A metadata approach for building web application user interface
CN1326078C (en) Forming method for package device
JP3842576B2 (en) Structured document editing method and structured document editing system
CN114117242A (en) Data query method and device, computer equipment and storage medium
JP3842572B2 (en) Structured document management method, structured document management apparatus and program
Lingam et al. Supporting end-users in the creation of dependable web clips
US20070244860A1 (en) Querying nested documents embedded in compound XML documents
WO2010147453A1 (en) System and method for designing a gui for an application program
KR100704285B1 (en) Apparatus and methd for constructing ontology of product data using resource description framework

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

Granted publication date: 20110504

Termination date: 20141229

EXPY Termination of patent right or utility model