Loading large XML file ( 222 MB) in HTML using java script problem
-
Hi All, I am trying to load large XML file(222 MB) using javascript for HTML format. It is taking a lot of time. Can anyone suggest me to make it more efficient? Any sample is more appreciated. I am using something like below, var xmlDoc=null; if (window.ActiveXObject) //IE 8,9 { xmlDoc=new ActiveXObject("Microsoft.XMLDOM"); } else if (document.implementation.createDocument) { xmlDoc=document.implementation.createDocument ("","",null); } else { alert('Your browser cannot handle this script'); } if (xmlDoc!=null) { xmlDoc.async=false; xmlDoc.load('Load.xml'); // Large xml file }
-
Hi All, I am trying to load large XML file(222 MB) using javascript for HTML format. It is taking a lot of time. Can anyone suggest me to make it more efficient? Any sample is more appreciated. I am using something like below, var xmlDoc=null; if (window.ActiveXObject) //IE 8,9 { xmlDoc=new ActiveXObject("Microsoft.XMLDOM"); } else if (document.implementation.createDocument) { xmlDoc=document.implementation.createDocument ("","",null); } else { alert('Your browser cannot handle this script'); } if (xmlDoc!=null) { xmlDoc.async=false; xmlDoc.load('Load.xml'); // Large xml file }
-
Firstly, don't duplication your question over many forums. Second, considering the size of the file, and what you are trying to do with the thing, why are you surprised it is taking a rather long period of time.
-
Hello Richard, Sorry to bother you again. I am new to web technology so I have not much idea on this. Please provide me the best technique to achieve this. Regards, SMA
I will not give you source code. But I will give you some links to read which may help ... https://jacobcarpenter.wordpress.com/2010/01/07/reading-large-xml-files/[^] http://office.microsoft.com/en-gb/sharepoint-server-help/convert-an-xml-file-to-a-web-page-HA010215482.aspx[^] and this is a conversation that you may find interesting ... http://www.dreamincode.net/forums/topic/147336-fast-way-to-read-a-large-xml-file/[^] Other solutions could include splitting the XML file into smaller files such as ... Split large XML files into small files[^] Trust you may find some comfort from the above.