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 | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
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: 569
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: 15376
    
    6
The content type of the page has to be XML

Eric
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61653
    
  67

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


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: XMLHTTPRequest Handling HTML Response