ASP accessing XML file

Results 1 to 3 of 3

Thread: ASP accessing XML file

  1. #1
    Seema Guest

    Default ASP accessing XML file

    I want to post one question on xml being accessed by ASP.<BR>Code which i got from this site grabs from xml through ASP.But that xml is assumed to be on the same server, as it uses Server.MapPath which accepts virtual path and returns Physical path.<BR>I want to grab xml file which is on other server.<BR>So how can be done because i can&#039t give http://www...and the virtual path as virtual path would be only after / ie domain name. I can&#039t give physical pathof online server for eg<BR>http://303.45.44.7/upload/.........<BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: ASP accessing XML file

    You would use the load method of the xml object. For example:<BR><BR>set loXML = Server.CreateObject("Microsoft.XMLDOM")<BR>loXML.a sync = false<BR>loXML.load("")<BR><BR>To see the contents of your object use: Response.write loXML.xml

  3. #3
    Seema Guest

    Default RE: ASP accessing XML file PLEASE HELP

    Thankyou for answering my query .I tried using load method but its giving error.<BR><BR>I am putting my code here.I would be very obligied if u debug it.<BR>Is there any special permission to give to .XML file which is on the server.<BR>&#060;%<BR> Set objXML = Server.CreateObject("Microsoft.XMLDOM")<BR> Set objLst = Server.CreateObject("Microsoft.XMLDOM")<BR> objXML.async = False<BR><BR> objXML.Load("")<BR><BR> If objXML.parseError.errorCode &#060;&#062; 0 Then<BR> response.write "handle the error"<BR> End If<BR><BR> Set objLst = objXML.getElementsByTagName("*")<BR> nlen= objLst.length - 1<BR><BR> For i = 0 to nlen <BR> StrDate = objLst.item(i).text<BR> response.write StrDate & "<BR>"<BR> Next<BR>%&#062;<BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts