XML XPath Search Optimization via Precomputed Parent-Child Tables
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Searching large XML documents using XPath expressions can be time-consuming due to the need to traverse the entire hierarchical tree, especially for complex queries and large datasets.
Innovation Solution
A method that represents XML documents as a hierarchical tree structure and uses tables to identify only relevant parent nodes that potentially have child nodes satisfying an XPath query, allowing for targeted searching without scanning the entire tree.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Measurement precision
If the entire hierarchical tree is searched using XPath expressions, then all possible matching nodes are found, but search time increases significantly for large XML documents
Solution Approach 1:
The patent pre-processes the XML document into a hierarchical tree structure and pre-computes parent-child relationship tables before XPath queries are executed. This preliminary organization of data allows queries to skip unnecessary traversal steps and directly access relevant nodes, significantly reducing search time while maintaining complete search coverage
Solution Approach 2:
The patent segments the search process by dividing it into distinct phases: pre-processing the XML document into a tree structure with relationship tables, and then executing queries using these pre-computed relationships. This segmentation allows the system to avoid re-traversing the entire document for each query, improving efficiency while ensuring all nodes are properly considered
2Measurement precision
If XPath expressions traverse the entire hierarchical tree structure, then accurate matching results are obtained, but computational resources are excessively consumed
Solution Approach 1:
The system pre-computes and stores parent-child relationship tables that map nodes to their potential matching children based on XPath patterns. This preliminary computation eliminates the need to traverse entire subtrees during query execution, reducing computational resource consumption while maintaining accurate matching through the pre-established relationships
Solution Approach 2:
The patent extracts only the necessary parent-child relationship information from the complete hierarchical tree and stores it in optimized tables. This extraction creates a condensed representation that contains only the relevant matching relationships, allowing queries to operate on this smaller structure rather than the full document tree, thus reducing computational overhead while preserving matching accuracy
Data Source
AI summary
Methods and apparatus, including computer program products, for searching for one or more logical elements in a hierarchical tree structure of an extended markup language document conforming to a schema used for XML. The method includes the steps of (1) providing a representation of an extended markup language document instance containing two or more logical elements, one being a parent node and one a child node in a hierarchical tree structure describing the representation; (2) receiving a query for logical elements satisfying an XPath expression; and (3) searching in the hierarchical tree structure only nodes that potentially have child nodes satisfying the XPath expression.


