Utilising firefox (17.01), I am generating a xml code from uploaded .csv files. This code is going to be transformed to xhtml afterwards, but before, I need to create the valid xml file.
My entire code is
var parser = new DOMParser();
var xml_doc = parser.parseFromString(xml_code,'text/xml');
var xslhttp = new XMLHttpRequest();
xslhttp.open("GET",xsl_code,false);
xslhttp.send();
var xsl_doc = xslhttp.responseXML;
var xsltProcessor = new XSLTProcessor();
xsltProcessor.importStylesheet(xsl_doc);
var xhtml_code = xsltProcessor.transformToFragment(xml_doc,document);
And it works as it should, except when I work with large files. In particular, the script is failing when xsl_code is as large as 112.039.355 (xml_code.length).
The error message is
NS_ERROR_XPC_BAD_CONVERT_JS: Could not convert JavaScript argument arg 0 [nsIDOMParser.parseFromString]
Is there any explanation for that? Any limitation with firefox? I know that if I eliminate content from the file, eventually the xml_doc will be correctly generated
Many thanks