发明名称 Searching document object model elements by attribute order priority
摘要 Embodiments of the invention provide systems and methods for searching for elements of a document based on an order priority of attributes of a query expression. According to one embodiment, a method of searching a plurality of objects of a document, such as elements of a DOM document, can comprise generating a query expression with attributes related to a target object of the document. For example, the expression can comprise an XPath expression. The attributes of the query expression can be parsed into one or more attribute groups, each comprising at least one attribute, based on logical operators between the attributes. Each one or more attribute groups of each expression can be weighted and a search can be performed for the target object in the document based on the weighted one or more attribute groups of the query expression.
申请公布号 US9460232(B2) 申请公布日期 2016.10.04
申请号 US201012755628 申请日期 2010.04.07
申请人 ORACLE INTERNATIONAL CORPORATION 发明人 Li Fangsheng;Lu Weiqi
分类号 G06F7/00;G06F17/30 主分类号 G06F7/00
代理机构 Kilpatrick Townsend & Stockton LLP 代理人 Kilpatrick Townsend & Stockton LLP
主权项 1. A method for searching a plurality of objects within ea Document Object Model (DOM) document, the method comprising: receiving an XPath expression, the XPath expression comprising a plurality of attributes and one or more logical operators defining relationships between the attributes, the logical operators comprising one or more of a logical AND, a logical OR, or a logical NOT; generating a tree structure representing the XPath expression, the tree structure comprising a plurality of nodes arranged according to a hierarchical relationship between the attributes based upon positions of the plurality of attributes and the one or more logical operators in the XPath expression, each node in the plurality of nodes representing a group of one or more attributes from the plurality of attributes, the plurality of nodes including a set of leaf nodes that do not have any child nodes; associating a weight value with each node in the plurality of nodes in the tree structure based upon a location of the node in the tree structure, wherein the associating comprises: assigning a weight value to each of the set of leaf nodes based upon the positions of the plurality of attributes corresponding to the set of leaf nodes in the XPath expression; andfor each node in the plurality of nodes other than the set of leaf nodes, assigning a weight value to the node based upon weight values assigned to one or more child nodes of the node; for each object in the plurality of objects within the DOM document, calculating a score for the object based on a comparison of one or more attributes of the object to the plurality of attributes within the XPath expression and based upon the weight values associated with the plurality of nodes in the tree structure; determining a target object from the plurality of objects within the DOM document, based on the scores calculated for the plurality of objects; and outputting information related to the target object as a response to the receipt of the XPath expression.
地址 Redwood Shores CA US