From: John W Higgins Date: 2009-12-01T04:14:27+09:00 Subject: Re: Odd puts behaviour with REXML --001636920c13e276f204799b72d4 Content-Type: text/plain; charset=ISO-8859-1 David, On Mon, Nov 30, 2009 at 10:58 AM, David Sainte-claire < dsainteclaire@gmail.com> wrote: > > Where data is the body of an HTTP GET request to a ReST-ish web service > (I can't post the endpoint of the web service since it's an internal > server) > > First, you need to get your internal service fixed so it returns properly XML encoded URLs. You are not currently getting XML back from the service so your stuck with garbage at the moment. If you get really stuck you're going to need to find and replace those ampersands. > Is there any way that I can ignore the formatting rules for illegal > character and just take the whole text as a string? The article that > the first person posted said that the webservice should return links in > this format: > > http://www.somecompany.com/US/perl/model-home.pl?XID=M:products:crmportal&LOC=3&mdl=someModel > > using & instead of just & between arguments in the URL, which might > fly with REXML, but I'm not sure how to strip all that back off to make > it into a valid link since my browser doesn't know what to do with the > URL that has & between all the query parameters > > You don't have to - any XML parser will make the change for you because it understands the & encodings and will return you the proper string with nice pretty ampersands :) Please try using the proper XML string prior to complaining that it's not what you want. John --001636920c13e276f204799b72d4--