Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

XML (extensive markup language) path expression extracting method and device

A path expression and extraction method technology, which is applied in the field of XML path expression extraction, can solve problems such as missing element nodes, failure, and finding wrong element nodes, etc.

Active Publication Date: 2014-02-26
BEIJING JINGDONG SHANGKE INFORMATION TECH CO LTD +1
View PDF4 Cites 8 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0009] However, the XML path expression for extracting element nodes in the prior art is usually not stable enough. When a small change occurs in the layout of the web page, the original XML path expression is likely to be invalid, and the invalid XML path expression cannot be found. to the element node or find the wrong element node

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • XML (extensive markup language) path expression extracting method and device
  • XML (extensive markup language) path expression extracting method and device
  • XML (extensive markup language) path expression extracting method and device

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0032] The present invention will be described in further detail below in conjunction with the accompanying drawings and specific embodiments.

[0033] Such as figure 1 Shown is the working flowchart of a kind of XML path expression extracting method of the present invention, comprises:

[0034] Step 1, setting a plurality of restrictive conditions with a hierarchical relationship, initializing the restrictive condition at the lowest level as the current restrictive condition, and the restrictive condition at the lowest level is the strictest in identifying the element node to be identified;

[0035] Step 2, extract the XML path expression of the element node to be identified under the current restriction;

[0036] Step 3, locate according to the XML path expression, and:

[0037] If the XML path expression uniquely locates the element node to be identified, the extraction of the XML path expression ends;

[0038] Otherwise, if the XML path expression locates more than one ...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention discloses an XML path expression extracting method and device. The method comprises, step (1), setting limit conditions with a plurality of hierarchical relations and initializing the limit conditions of the lowest layer as current limit conditions; step (2), extracting the XML path expression of an element node to be identified under the current limit conditions; step (3), performing location according to the XML path expression, and if the XML path expression locates a unique element node, ending the XML path expression extraction; if not, namely, if the XML path expression locates more than one element nodes, selecting the limit conditions one layer above the current limit conditions as current limit conditions and re-executing the step (2). By means of the XML path expression which is as strict as possible, the XML path expression extracting method and device can reduce the possibility of XML path expression failures when web pages have small changes.

Description

technical field [0001] The present invention relates to the technical field related to XML, in particular to a method and device for extracting XML path expressions. Background technique [0002] XPath is a language for finding information in XML documents. XPath can be used to traverse element nodes and attributes in XML documents. XPath uses XML path expressions to select nodes or sets of nodes in an XML document. These XML path expressions are very similar to the expressions we see in regular computer file systems. [0003] In web page automation testing, the xpath method is often used to locate element nodes, and then operate on the located element nodes. For example, locate a button through xpath, and then automatically trigger the button to be clicked; another example, locate a text box through xpath, and then automatically assign a value to the text box. [0004] The existing method of obtaining an XML path expression is to start from the specified element node, o...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Applications(China)
IPC IPC(8): G06F17/30G06F9/46
CPCG06F16/832G06F16/9558
Inventor 刘佳
Owner BEIJING JINGDONG SHANGKE INFORMATION TECH CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products