{'fraction_non_alphanumeric': 0.025280898876404494, 'fraction_numerical': 0.0, 'mean_word_length': 4.972067039106145, '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}}
Accelerating Parent-Child Path Matching in XML

With the rapidly increasing popularity of XML as a data format, there is a large demand for efficient XML structural matching techniques. Normally, data in XML are stored in a tree-like structure where nodes (with data) are located using the path relations in the tree. This paper proposes a coding policy named path code to accelerate an important category of structure matching in XML, namely the Parent-Child paths. A Parent-Child path is the path expression that contains only parent-child relationships. The proposed path code employs a partial prefix Path of XML elements using a special compression technique. Based on the path code, we present a Boosting algorithm, which has low-linear time complexity and little I/O cost, to match Parent-Child paths. In addition, we propose two heuristic policies to optimize the Boosting algorithm further by reducing the memory consumption. Our experiments show that the Boosting algorithm considerably outperforms previous algorithms in run-time Parent-Child path matching.