Altova Mailing List Archives>Archive Index >microsoft.public.xml Archive Home >Recent entries [Thread Prev] >Thread Next - Re: Bad load Performance XML Bad load Performance XMLTo: NULL Date: 11/2/2004 9:00:00 AM How do I improve the load performance speed with my xml load procedure.? The
xml file size is 29943.07KB.
----This is how I load the xml and xsl in HTML.---
function init(){
// Check client for Msxm12 version
try {
objSrcTree = new ActiveXObject("Msxml2.DOMDocument.4.0");
}
catch (err) {
// Can't create Automation object, must pop up a window to load MSXML 4 SP2
msxml4Pop();
}
// Load xml and xsl files
objSrcTree = new ActiveXObject("Msxml2.DOMDocument.4.0");
objSrcTree.async = false;
objSrcTree.load('DOLXMLWEBOUT.xml');
// Check for errors in loading xml
if (objSrcTree.parseError != 0) {
output.innerHTML = objSrcTree.parseError.reason + "<BR>"
output.innerHTML += objSrcTree.parseError.url + "<BR>"
output.innerHTML += objSrcTree.parseError.errorCode + "<BR>"
output.innerHTML += objSrcTree.parseError.filepos + "<BR>"
output.innerHTML += objSrcTree.parseError.line + "<BR>"
output.innerHTML += objSrcTree.parseError.linepos + "<BR>"
}
objXSLT=new ActiveXObject('MSXML2.FreeThreadedDOMDocument.4.0');
objXSLT.async = false;
objXSLT.load('DOLWMDDXSL.xsl');
objCache = new ActiveXObject("Msxml2.XSLTemplate.4.0");
objCache.stylesheet = objXSLT;
}
function search()
{
// Search the value of the entryfield
var objXSLTProc = objCache.createProcessor();
objXSLTProc.input = objSrcTree;
// Pass the entryfield value to the xsl file
objXSLTProc.addParameter("nameSearchValue", ORDER.value);
result=objSrcTree.selectNodes("//REQUISITION/ORDNBR[.='"+ORDER.value+"']")
if (result.length > 0) {
// The results count of the search
doPopupcnt();
objXSLTProc.transform();
output.innerHTML = objXSLTProc.output;
} else {
// Pop up letting the user know that the search didn't find anything
doPopup();
objXSLTProc.transform();
output.innerHTML = objXSLTProc.output;
}
}
</SCRIPT>
-- XML---
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
