{'fraction_non_alphanumeric': 0.012578616352201259, 'fraction_numerical': 0.0, 'mean_word_length': 4.712820512820513, '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}}
The SQL Function XMLNEST to Generate Recursive XML Values from Relational Data

SQL standard provides SQL/XML publishing functions to publish the result of an SQL query as XML values but it does not provide any SQL/XML publishing function that can publish the result of a recursive SQL query as recursively structured XML values. Therefore, to publish transitively connected relational tuples as recursively structured XML values with the use of appropriate SQL/XML publishing functions, we have to write a nested SQL query. Writing that query, however, is not easy provided that the depth of the connections is deep even if we know the depth of them and is not possible once the depth of the connections is not known in advance. To solve the problem, we propose a new SQL function XMLNEST that can publish the result of a recursive SQL query as recursively structured XML values. Both the recursive structure and the order of sibling XML elements of the XML values can be specified in the invocation of XMLNEST. Our experiments show that the proposed scheme will be the unique reasonable solution to the problem.