<commit_before>/**
 * Created by A.Hofmann on 17.03.2015 at 23:33.
 */
mix.declare("mix.Parser", ["mix.Utils"], function(Utils)
{
	"use strict";
	function Parser(xml, resultType)
	{
		if(!(this instanceof Parser))
		{
			return new Parser(xml);
		}
		this.resultType = resultType || Parser.XML;
		this.result = null;
		if(Utils.isString(xml))
		{
			switch(this.resultType)
			{
				case "XML":
				{
					this.result = this.toXml(str);
				}
					break;
			}
		}
	}

	//-----------------------------------------------------------------------------------------------------------------------
	Parser.prototype.toXml = (function()
	{
		if(Utils.isFunction(window.DOMParser))
		{
			return function toXml(str)
			{
				return new DOMParser().parseFromString(str, "application/xml");
			}
		}
		return function toXml(str)
		{
			var xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
			xmlDoc.async = false;
			xmlDoc.loadXML(str);
			return xmlDoc;
		}
	})();
	//-----------------------------------------------------------------------------------------------------------------------
	Parser.XML = "XML";<commit_msg>xml as json preparation<commit_after>/**
 * Created by A.Hofmann on 17.03.2015 at 23:33.
 */
mix.declare("mix.Parser", ["mix.Utils"], function(Utils)
{
	"use strict";
	function Parser(xml, resultType)
	{
		if(!(this instanceof Parser))
		{
			return new Parser(xml);
		}
		this.resultType = resultType || Parser.XML;
		this.result = null;
		if(Utils.isString(xml))
		{
			switch(this.resultType)
			{
				case "XML":
				{
					this.result = this.toXml(str);
				}
					break;
			}
		}
	}

	//-----------------------------------------------------------------------------------------------------------------------
	function Node()
	{
		this.parent = null;
		this.ns = "";
		this.type = 0;
		this.prefix = "";
		this.name = ""
		this.before = "";
		this.after = "";
		this.children = [];
		this.attributes = {}
	}

	//-----------------------------------------------------------------------------------------------------------------------
	Parser.parseXML = (function()
	{
		if(Utils.isFunction(window.DOMParser))
		{
			return function toXML(str)
			{
				return new DOMParser().parseFromString(str, "application/xml");
			}
		}
		return function toXML(str)
		{
			var xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
			xmlDoc.async = false;
			xmlDoc.loadXML(str);
			return xmlDoc;
		}
	})();
	//-----------------------------------------------------------------------------------------------------------------------
	Parser.XML = "XML";
{'fraction_non_alphanumeric': 0.36252945797329145, 'fraction_numerical': 0.009819324430479183, 'mean_word_length': 1.3154545454545454, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 17}, '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': '4070842', 'n_tokens_mistral': 891, 'n_tokens_neox': 735, 'n_words': 131}