aspose file tools
The moose likes HTML, CSS and JavaScript and the fly likes XMLHTTPRequest Handling HTML Response Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Reply Bookmark "XMLHTTPRequest Handling HTML Response" Watch "XMLHTTPRequest Handling HTML Response" New topic
Author

XMLHTTPRequest Handling HTML Response

Alec Lee
Ranch Hand

Joined: Jan 28, 2004
Posts: 568
Normally, when we send back XML to XMLHttpRequest, request.responseXML will return the parsed DOM tree. Is it possible to retrieve a parsed DOM tree too if we return HTML (content-type: texl/html) instead of XML? For example, my XMLHttpRequest could request a normal HTML page and retrieve a specific tag from it.
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15357
    
    6
The content type of the page has to be XML

Eric
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 56185
    
  13

Why not return XHTML, which is valid XML, and be done with it?


[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: XMLHTTPRequest Handling HTML Response
 
Similar Threads
[B]Error while reading XML from Webserver using Ajax[/B]
Using XmlHttpRequest object
DOM of current page?
file handling through EJB
Need for XPATH/XSLT