<commit_before>#! /usr/bin/python
# -*- coding: utf-8 -*-
#-----------------------------------------------------------------------------
# Name:     WrapperXml.py
# Purpose:
#
# Author:   <NAME> <<EMAIL>>
#
# Created:  23/04/2008
# Licence:  GPLv3 or newer
#-----------------------------------------------------------------------------
# Revision list :
#
# Date       By        Changes
#
#-----------------------------------------------------------------------------

__doc__ = ""
__version__ = "1.0.0"
__versionTime__ = "23/04/2008"
__author__ = "<NAME> <<EMAIL>>"

import os
import xml.etree.cElementTree as ET
from periphondemand.bin.utils.error import Error
from periphondemand.bin.utils import wrappersystem as sy

def XMLBeautifier(xml_data):
    """
    This function make XML output looks better and more readable.
    <NAME> <<EMAIL>>

    Can be done with "indent" function in ElementTree
    """
    xml_text = ""
    xml_ident = 0
    for xml_line in xml_data.split('<'):
        xml_line = xml_line.strip()
        if(len(xml_line) > 0):
            if xml_line.endswith("/>"):<commit_msg>src/bin/utils/wrapperxml.py: wrappersystem was useless<commit_after>#! /usr/bin/python
# -*- coding: utf-8 -*-
#-----------------------------------------------------------------------------
# Name:     WrapperXml.py
# Purpose:
#
# Author:   <NAME> <<EMAIL>>
#
# Created:  23/04/2008
# Licence:  GPLv3 or newer
#-----------------------------------------------------------------------------
# Revision list :
#
# Date       By        Changes
#
#-----------------------------------------------------------------------------

__doc__ = ""
__version__ = "1.0.0"
__versionTime__ = "23/04/2008"
__author__ = "<NAME> <<EMAIL>.<EMAIL>>"

import os
import xml.etree.cElementTree as ET

from periphondemand.bin.utils.error import Error

def XMLBeautifier(xml_data):
    """
    This function make XML output looks better and more readable.
    <NAME> <<EMAIL>>

    Can be done with "indent" function in ElementTree
    """
    xml_text = ""
    xml_ident = 0
    for xml_line in xml_data.split('<'):
        xml_line = xml_line.strip()
        if(len(xml_line) > 0):
            if xml_line.endswith("/>"):
{'fraction_non_alphanumeric': 0.32378353797180537, 'fraction_numerical': 0.020918599363346977, 'mean_word_length': 1.4282560706401766, 'pattern_counts': {'":': 0, '<': 24, '<?xml version=': 0, '>': 26, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 21}, '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}}
{'dir': 'git-commits-cleaned', 'id': '6315807', 'n_tokens_mistral': 666, 'n_tokens_neox': 629, 'n_words': 156}