<commit_before>#include <string.h>
#include "xml/Writer.h"
#include "xml/Utils.h"

using namespace Framework;
using namespace Framework::Xml;

CWriter::CWriter(CStream* pStream, CNode* pNode)
{
	m_pStream	= pStream;
	m_pNode		= pNode;
}

CWriter::~CWriter()
{

}

void CWriter::WriteDocument(CStream* pStream, CNode* pNode)
{
	CWriter* pWriter;
	
	pWriter = new CWriter(pStream, pNode);
	pWriter->WriteNode(0);
	delete pWriter;
}

void CWriter::WriteNode(unsigned int nLevel)
{
	if(strcmp(m_pNode->GetText(), "") == 0)
	{
		if(m_pNode->GetChildCount() == 1)
		{
			m_pNode = m_pNode->GetFirstChild();
			WriteNode(nLevel);
			return;
		}
	}

	if(m_pNode->GetChildCount() == 0)
	{
		if(m_pNode->IsTag())
		{
			DumpTabs(nLevel);
			DumpString("<");<commit_msg>Cleanup.<commit_after>#include <string.h>
#include "xml/Writer.h"
#include "xml/Utils.h"

using namespace Framework;
using namespace Framework::Xml;

CWriter::CWriter(CStream* pStream, CNode* pNode)
: m_pStream(pStream)
, m_pNode(pNode)
{

}

CWriter::~CWriter()
{

}

void CWriter::WriteDocument(CStream* pStream, CNode* pNode)
{
	CWriter* pWriter = new CWriter(pStream, pNode);
	pWriter->WriteNode(0);
	delete pWriter;
}

void CWriter::WriteNode(unsigned int nLevel)
{
	if(strcmp(m_pNode->GetText(), "") == 0)
	{
		if(m_pNode->GetChildCount() == 1)
		{
			m_pNode = m_pNode->GetFirstChild();
			WriteNode(nLevel);
			return;
		}
	}

	if(m_pNode->GetChildCount() == 0)
	{
		if(m_pNode->IsTag())
		{
			DumpTabs(nLevel);
			DumpString("<");
{'fraction_non_alphanumeric': 0.17211474316210806, 'fraction_numerical': 0.00533689126084056, 'mean_word_length': 4.9523809523809526, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 4}, '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': '5351977', 'n_tokens_mistral': 665, 'n_tokens_neox': 624, 'n_words': 100}