From: Dan Zwell Date: 2007-04-24T14:09:12+09:00 Subject: Re: HTTP requests Maybe it would serve xml if you sent the request with a header specifying {'Accept' => 'application/xhtml+xml'} ? But I don't think you can specify a header with Net::HTTP.get_response(), maybe try using Net::HTTP#get() ? Dan Peter Kemp wrote: > Hi all, > > Im trying to retrieve an xml document from a website but all i get is > the html > > I know their is a way to get this same page via xml > > require 'net/http' > require "rexml/document" > > url = > 'http://jira.atlassian.com/secure/BrowseProjects.jspa?=&os_username=soaptester&os_password=soaptester' > resp = Net::HTTP.get_response(URI.parse(url)) > data = resp.body > puts(data) > > doc = REXML::Document.new(data) > > any help would be great >