{'fraction_non_alphanumeric': 0.024965325936199722, 'fraction_numerical': 0.0, 'mean_word_length': 5.016666666666667, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
MLTwig: A Multi-Layer Tree Pattern Matching Approach for XQuery

Twig query, also known as tree pattern query (TPQ), is considered as the core operation of XML data queries. However, a complex XML query described by XQuery often cannot be represented by a single basic TPQ. Aiming at XQuery language, this paper presents a multi-layer tree pattern representation method, named MTP, and a matching algorithm MLTwig, which can effectively use intermediate results of outer query to match inner tree pattern in MTP based on a novel data structure, WTree, thereby saving time and space. Experimental results show that this algorithm can improve the processing efficiency for XQuery expression which can be represented by MTP.