Jump to content
ShivaPrasadm

XMLHttpRequest to load XML documents

Recommended Posts

Hi i am new to the XSLT coding.I am trying to load a XML document in XSL, I am using IE8 to display the HTMLmy question is can i use the "XMLHttpRequest" object to read data from XML. Thank you for your help and valuable time :) RegardsShiva

Share this post


Link to post
Share on other sites

if you mean you want to use ajax to get xml document, yes you can do that. did you check the ajax tutorials?

Edited by birbal

Share this post


Link to post
Share on other sites

We can use the below methods to load an XML file to XSL code.In documents i found that 1st method can be used for any advanced browser. second one for IE 5 and older but i dont want to use activeXobject in my project, So can i use the 1st method for IE6 and above. Will there be any effects if i use ist method in IE? 1)var xmlhttp=new XMLHttpRequest()2)var xmlhttp=new ActiveXObject("Microsoft.XMLHTTP")

Share this post


Link to post
Share on other sites

example from http://w3schools.com/ajax/ajax_xmlhttprequest_create.aspvar xmlhttp;if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest(); }else {// code for IE6, IE5 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); }bold part will check if that object exist or not if it does not (in ie5/6) it will execute else part.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...