wood burning stoves
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

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

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

Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63343

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
It's not a secret anymore!