Streaming query system and method for extensible markup language
AssigneeNational Taiwan University of Science and Technology
InventorsHahn-Ming Lee, Li-Zhen Liu, Chieh-Hung Lin, Jerome Yeh, Chia-Hsin Huang
Life of this patent
Estimating the term…
Abstract
A streaming query system for extensible markup language is provided. An XPath query translator receives and analyzes a user-input XPath document. An abstract syntax tree analyzer establishes an abstract syntax tree. A XML parser receives and parses an XML document. An index generator generates an index for the XML document. A computation module performs a format calculation based on the abstract syntax tree and the index, and generates a query result accordingly.
Claims8
A streaming query method for extensible markup language, comprising:
- receiving and analyzing a user-input XPath (Extensible Markup Language Path Language) document;
- receiving a result obtained by analyzing the XPath document, and building an abstract syntax tree accordingly, wherein the building of the abstract syntax tree comprises the steps of:
- establishing a single tree structure according to the result obtained by analyzing the XPath document;
- and
- dividing the single tree structure into independent and undividable tree-structure components;
- receiving an Extensible Markup Language (XML) document, and parsing nodes of the XML document;
- generating an index of the XML document according to the result obtained by analyzing the XML document;
- and
- receiving the abstract syntax tree and the index, performing a format computation and obtaining a query result accordingly;
- wherein the establishing the single tree structure comprises the steps of:
- when receiving a query string input by a user, loading one line of the query string at a time;
- extracting an axis of the loaded query string;
- generating an operator;
- performing a node test;
- retrieving an operand, and assigning an unspecified variable to the operand;
- establishing a tree structure according to the operator and the operand;
- and
- determining whether a backward axis exists in the operand, and if the backward axis exists in the operand, reversing the tree structure, otherwise maintaining the original tree structure.
Dependencies are inferred from the claim text.