Link to home
Start Free TrialLog in
Avatar of Saqib Khan
Saqib KhanFlag for United States of America

asked on

Reading Remote XML File

why is it whenever I try to Read an XML file i am receieving following error...

Response object error 'ASP 0185 : 80020003'

Missing Default Property

/WebService/send.asp, line 0

A default property was not found for the object.


and the Code that i am using to read remote XML file is.

Set XR = Server.CreateObject("Microsoft.XMLHTTP")
XR.open "POST", "http://khanzone.com/WebService/additem.xml", False
XR.send

Response.Write XR.responseXML   ' < This Causes Error

and my remote XML file looks like this...

<xml>
      <fname>S Khan</fname>
</xml>

and is it ok to post XML data to a remote url using XMLHTTP? or there are other better techniques?

Thanks
Avatar of golfDoctor
golfDoctor

Just use XR.responsetext
"and is it ok to post XML data to a remote url using XMLHTTP"

Yes, that's what XMLHTTP us for, basically.
Avatar of Saqib Khan

ASKER

then what is the responseXML method for?

i tried two examples with responseText, one returned blank page but when i did view source i was able to see the xml output, how can i obtain the output on screen so i can parse it.

and in second example it returned following error when i used responseTEXT method.

The page you are looking for cannot be displayed because an invalid method (HTTP verb) was used to attempt access.
(Too see the xml, visit the link above)

please advise.
"then what is the responseXML method for?"

You would benefit from searching the explanation of objects in search engines.  This really is not a teach me how everything works forum.  We can help you solve a problem, but this is not a course.

http://msdn2.microsoft.com/en-us/library/ms534370.aspx 


"The page you are looking for cannot be displayed because an invalid method (HTTP verb) was used to attempt access. "

Make sure you have .xml extension set up in IIS to accept POST, or All Verbs, in IIS Manager
> This really is not a teach me how everything works forum

Sorry but all I asked was why should I use responseTEXT instead of  responseXML.

 > We can help you solve a problem, but this is not a course.
I completely understand, I am a expert myself (if you review my profile)

 > Make sure you have .xml extension set up in IIS to accept POST

In my question i clearly specified, for some XML files it works and for some it does not, i have exact code pasted above, its not IIS issue.
Are you using Vista/IIS 7?
ASKER CERTIFIED SOLUTION
Avatar of b0lsc0tt
b0lsc0tt
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I'm glad that helped.  Thanks for the grade, the points and the fun question.

bol