Zhewei Jiang, Cheng Luo, Wen‐Chi Hou, Dunren Che and Qiang Zhu
The purpose of this paper is to provide an efficient algorithm for Extensible Markup Language (XML) twig query evaluation.
Abstract
Purpose
The purpose of this paper is to provide an efficient algorithm for Extensible Markup Language (XML) twig query evaluation.
Design/methodology/approach
A single‐phase holistic twig pattern matching method based on the TwigStack algorithm is proposed. The method applies a novel stack structure to preserve the holisticity of the twig matches. Twig matches rooted at elements that are currently in the root stack are output directly.
Findings
Without generating individual path matches as intermediate results, the method is able to avoid the storage and output/input of the individual path matches, and totally eliminate the potentially time‐consuming merging operation. Experimental results demonstrate the applicability and advantages of our approach.
Originality/value
The paper proposes an efficient XML twig query evaluation algorithm, which by both theoretical analyses and empirical studies demonstrates its advantages over the current state‐of‐the‐art algorithm TwigStack.