homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / XML Development
Forum Library, Charter, Moderators: httpwebwitch

XML Development Forum

Read XML From ASHX Handler
Newbie Question

 5:52 pm on Jul 6, 2010 (gmt 0)

Hey, I've got what hopefully is a simple question. We're constructing a real-estate site and we want to use data from a foreclosures API. I've never really done any XML before, but I've got the basics down to the point where I can read in XML data from a remote XML file and display it in HTML (which obviously is much more basic than the end goal, but as long as I can actually read in data from the XML file and do ANYTHING with it, I know how to get the rest done...).

My problem now is that both the API's we want to use don't actually return an XML file--one uses as ASHX handler and the other...well I don't know what it uses. Either way, neither of the request URL's end in .xml. Is there something really simple that I am missing?

I just can't get the XMLHTTPRequest to actually return anything. How do I read in the returned XML data from a URL that doesn't actually end in .xml (which I assume means it isn't actually an XML file, per se)?

[edited by: httpwebwitch at 6:10 pm (utc) on Jul 6, 2010]
[edit reason] removed example URL [/edit]



 6:09 pm on Jul 6, 2010 (gmt 0)

An ASHX-ended URL simply reveals that they're using .NET to render the output. An XML web service doesn't need to end with *.xml for it to be good & usable XML. And indeed, the web service is giving out XML, so that part is OK.

You mention XMLHTTPRequest... so I take it you're doing this with JavaScript?
There are better tools for the job - JavaScript is notoriously inept at handling XML. Kind of ironic, but true. It can be done for sure, but it's inevitably more of a struggle than using a server-side method in PHP or ASP or something like that.

But that's not what you asked.
Don't worry about the URL ending with *.xml - the web service is fine. The problem, I'm sorry to say, is on your plate.

Good luck :)


 6:11 pm on Jul 6, 2010 (gmt 0)

Welcome to WebmasterWorld!

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / XML Development
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved